Skip to content

Commit

Permalink
More complicated user check
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Shotwell committed Jul 28, 2023
1 parent ce63756 commit c87a797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/issue_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Check if the issue creator is a maintainer
id: check_maintainer
run: echo "::set-output name=is_maintainer::$(echo ${{ github.event.issue.user.type }} | tr '[:upper:]' '[:lower:]')"
run: echo "::set-output name=is_maintainer::$(curl -s -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/${{ github.repository }}/collaborators/${{ github.event.issue.user.login }}/permission | jq -r '.permission' | grep -q 'admin' && echo 'true' || echo 'false')"

- name: Apply "needs triage" label to issues created by non-maintainers
if: steps.check_maintainer.outputs.is_maintainer == 'user'
Expand Down

0 comments on commit c87a797

Please sign in to comment.