File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : label-incoming-prs
2+
3+ on :
4+ pull_request_target :
5+ types : [opened]
6+
7+ jobs :
8+ label-incoming-prs :
9+ name : Label incoming PRs
10+ runs-on : ubuntu-latest
11+ permissions :
12+ pull-requests : write
13+ steps :
14+ - name : Add not-actionable label
15+ run : |
16+ set -e # Exit if one of commands exit with non-zero exit code
17+ set -u # Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’ as an error
18+ set -o pipefail # Any command failed in the pipe fails the whole pipe
19+
20+ author="$(gh pr view "$PR" --json author --jq '.author.login')"
21+
22+ label() {
23+ gh pr edit "$PR" --add-label not-actionable
24+ }
25+
26+ test "$author" = nikitabobko || test "$author" = mobile-ar || test "$author" = rickyz || label
27+ env :
28+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ GH_REPO : ${{ github.repository }}
30+ PR : ${{ github.event.number }}
You can’t perform that action at this time.
0 commit comments