Skip to content

Commit ad8230a

Browse files
Gordon Shotwellschloerke
andauthored
Add a triage label to issues created by non-maintainers (#647)
Co-authored-by: Barret Schloerke <[email protected]>
1 parent 808fc37 commit ad8230a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Issue Management
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
triage_or_add_to_project:
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
14+
steps:
15+
- name: Check if the issue creator is a maintainer
16+
id: check_maintainer
17+
run: |
18+
IS_ADMIN=`gh api /repos/rstudio/py-shiny/collaborators/${{ github.event.issue.user.login }}/permission --jq='.user.permissions.admin'`
19+
echo "is_maintainer=$IS_ADMIN" >> "$GITHUB_OUTPUT"
20+
21+
- name: Apply "needs triage" label to issues created by non-maintainers
22+
if: steps.check_maintainer.outputs.is_maintainer == 'false'
23+
run: |
24+
gh issue edit ${{ github.event.number }} --add-label "needs-triage" --repo ${{ github.repository }}

0 commit comments

Comments
 (0)