File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 - completed
88
99permissions :
10- pull-requests : write
11- actions : write
10+ pull-requests : read
11+ actions : read
1212 contents : read
1313
1414concurrency :
3434 emit_pr() {
3535 local pr_number="$1"
3636 local pr_author
37- pr_author=$(gh pr view "$pr_number" --repo "$REPO" --json author --jq '.author.login' 2>/dev/null || echo "")
38- if [ -z "$pr_author" ]; then
37+ pr_author=$(gh pr view "$pr_number" --repo "$REPO" --json author --jq '.author.login // empty ' 2>/dev/null || echo "")
38+ if [ -z "$pr_author" ] || [ "$pr_author" = "null" ] ; then
3939 echo "::warning::Could not fetch PR author for PR #$pr_number"
4040 fi
4141 echo "number=$pr_number" >> "$GITHUB_OUTPUT"
6868 call-ci-failure-bot :
6969 needs : find-pr
7070 if : ${{ needs.find-pr.outputs.pr_number != '' }}
71+ permissions :
72+ pull-requests : write
73+ actions : write
74+ contents : read
7175 uses : openwisp/openwisp-utils/.github/workflows/reusable-bot-ci-failure.yml@master
7276 with :
7377 pr_number : ${{ needs.find-pr.outputs.pr_number }}
Original file line number Diff line number Diff line change 383383 - completed
384384
385385 permissions :
386- pull-requests : write
387- actions : write
386+ pull-requests : read
387+ actions : read
388388 contents : read
389389
390390 concurrency :
410410 emit_pr() {
411411 local pr_number="$1"
412412 local pr_author
413- pr_author=$(gh pr view "$pr_number" --repo "$REPO" --json author --jq '.author.login' 2>/dev/null || echo "")
414- if [ -z "$pr_author" ]; then
413+ pr_author=$(gh pr view "$pr_number" --repo "$REPO" --json author --jq '.author.login // empty ' 2>/dev/null || echo "")
414+ if [ -z "$pr_author" ] || [ "$pr_author" = "null" ] ; then
415415 echo "::warning::Could not fetch PR author for PR #$pr_number"
416416 fi
417417 echo "number=$pr_number" >> "$GITHUB_OUTPUT"
@@ -444,6 +444,10 @@ job:
444444 call-ci-failure-bot :
445445 needs : find-pr
446446 if : ${{ needs.find-pr.outputs.pr_number != '' }}
447+ permissions :
448+ pull-requests : write
449+ actions : write
450+ contents : read
447451 uses : openwisp/openwisp-utils/.github/workflows/reusable-bot-ci-failure.yml@master
448452 with :
449453 pr_number : ${{ needs.find-pr.outputs.pr_number }}
You can’t perform that action at this time.
0 commit comments