Skip to content

Commit e259ff7

Browse files
chore(CI): add workflow to add new issues to project board
1 parent 10484e9 commit e259ff7

File tree

1 file changed

+38
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)