Skip to content

Commit 1976ee1

Browse files
Workflow: Add label "staff" to issues and PR to help prioritisation (#4726)
* Create add_staff_label.yml * print context * 2 steps for different types * set GH_TOKEN at job level * clean up a little * Update add_staff_label.yml * is this the syntax? * run only when PR is opened, not synchronised * Apply suggestion from @joshblack Co-authored-by: Josh Black <[email protected]> --------- Co-authored-by: Josh Black <[email protected]>
1 parent fd80a60 commit 1976ee1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/add_staff_label.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Add Staff Label
2+
3+
on:
4+
issues:
5+
types: [opened, reopened]
6+
pull_request:
7+
types: [opened, reopened]
8+
9+
jobs:
10+
add-staff-label:
11+
if: ${{ github.repository == 'primer/react' }}
12+
runs-on: ubuntu-latest
13+
env:
14+
GH_TOKEN: ${{ github.token }}
15+
steps:
16+
- name: Add label to issue
17+
if: ${{ github.event.issue.author_association == 'MEMBER' }}
18+
run: |
19+
gh issue edit ${{github.event.issue.html_url}} --add-label staff
20+
- name: Add label to pull_request
21+
if: ${{ github.event.pull_request.author_association == 'MEMBER' }}
22+
run: |
23+
gh pr edit ${{github.event.pull_request.html_url}} --add-label staff

0 commit comments

Comments
 (0)