Skip to content

Commit

Permalink
feat: is-user-in-team (#359)
Browse files Browse the repository at this point in the history
* feat: is-user-in-team

* chore: committing generated dist

* sample workflow

* need better perms in sample workflow

* chore: committing generated dist

* remove input check

* use teams.listMembersInOrg instead of .request

* chore: committing generated dist

---------

Co-authored-by: aschwenn <[email protected]>
  • Loading branch information
aschwenn and aschwenn authored Apr 10, 2023
1 parent cbfbef6 commit 987763c
Show file tree
Hide file tree
Showing 37 changed files with 270 additions and 27 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/is-user-in-team.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Is User In Team

on:
pull_request:
branches: [ main ]
paths:
- 'src/helpers/is-user-in-team.ts'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./
id: is-user-in-team
with:
helper: is-user-in-team
login: ${{ github.actor }}
team: github-helpers-committers
github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} # must have read:org permission

- run: echo ${{ steps.is-user-in-team.outputs.output }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ Additionally, the following parameters can be used for additional control over t
### [initiate-deployment](.github/workflows/deployments.yml#L12)
* Creates a new in-progress Github "deployment" for a commit. More information on Github deployment events can be found [here](https://docs.github.com/en/rest/reference/repos#deployments)

### [is-user-in-team](.github/workflows/is-user-in-team.yml)
* Checks if the specifed GitHub user exists within an organization team

### [manage-merge-queue](.github/workflows/manage-merge-queue.yml)
* Manages a queue for PRs as follows:
* Adding the `READY TO MERGE` label to a PR will add the PR to the "merge queue", represented by a `QUEUED FOR MERGE #X` label. Removing `READY TO MERGE` will remove this label and thus remove the PR from the queue.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ inputs:
delimiter:
description: 'A custom delimiter'
required: false
team:
description: 'A GitHub team'
required: false
outputs:
output:
description: 'The output of the helper'
Expand Down
2 changes: 1 addition & 1 deletion dist/0.index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 987763c

Please sign in to comment.