Skip to content

Commit

Permalink
Workflow: Add label "staff" to issues and PR to help prioritisation (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
siddharthkp and joshblack authored Jul 9, 2024
1 parent fd80a60 commit 1976ee1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/add_staff_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Add Staff Label

on:
issues:
types: [opened, reopened]
pull_request:
types: [opened, reopened]

jobs:
add-staff-label:
if: ${{ github.repository == 'primer/react' }}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Add label to issue
if: ${{ github.event.issue.author_association == 'MEMBER' }}
run: |
gh issue edit ${{github.event.issue.html_url}} --add-label staff
- name: Add label to pull_request
if: ${{ github.event.pull_request.author_association == 'MEMBER' }}
run: |
gh pr edit ${{github.event.pull_request.html_url}} --add-label staff

0 comments on commit 1976ee1

Please sign in to comment.