Skip to content

Commit 3c7c29d

Browse files
authored
Update gh actions for issue creation
1 parent a5f759f commit 3c7c29d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/extensions.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,27 @@ jobs:
1515
with:
1616
project-url: https://github.com/orgs/patternfly/projects/7
1717
github-token: ${{ secrets.GH_PROJECTS }}
18+
label-issue:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Team Membership Checker
22+
# You may pin to the exact commit or the version.
23+
# uses: TheModdingInquisition/actions-team-membership@a69636a92bc927f32c3910baac06bacc949c984c
24+
uses: TheModdingInquisition/[email protected]
25+
with:
26+
# Repository token. GitHub Action token is used by default(recommended). But you can also use the other token(e.g. personal access token).
27+
token: ${{ secrets.GH_READ_ORG_TOKEN }}
28+
# The team to check for.
29+
team: 'frequent-flyers'
30+
# The organization of the team to check for. Defaults to the context organization.
31+
organization: 'patternfly'
32+
# If the action should exit if the user is not part of the team.
33+
exit: true
34+
35+
- name: Add label if user is a team member
36+
run: |
37+
curl -X POST \
38+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
39+
-H "Accept: application/vnd.github.v3+json" \
40+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
41+
-d '{"labels":["PF Team"]}'

0 commit comments

Comments
 (0)