File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,11 +74,18 @@ jobs:
7474 echo "number=$NUMBER" >> "$GITHUB_OUTPUT"
7575
7676 AUTHOR=$(gh pr view --repo "${{ github.repository }}" "$HEAD_REF" --json author --jq '.author.login' 2>/dev/null || true)
77- ALLOWED="github-actions[bot] pavelfeldman yury-s dgozman Skn0tt dcrousso"
7877 TRIAGE_ALLOWED=false
79- for a in $ALLOWED; do
80- if [ "$a" = "$AUTHOR" ]; then TRIAGE_ALLOWED=true; break; fi
81- done
78+ case "$AUTHOR" in
79+ app/github-actions|app/microsoft-playwright-automation)
80+ TRIAGE_ALLOWED=true
81+ ;;
82+ *)
83+ if [ -n "$AUTHOR" ]; then
84+ PERM=$(gh api "repos/${{ github.repository }}/collaborators/$AUTHOR/permission" --jq .permission 2>/dev/null || echo none)
85+ case "$PERM" in write|admin) TRIAGE_ALLOWED=true ;; esac
86+ fi
87+ ;;
88+ esac
8289 echo "triage_allowed=$TRIAGE_ALLOWED" >> "$GITHUB_OUTPUT"
8390
8491 - name : Post report comment to PR
You can’t perform that action at this time.
0 commit comments