File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 77 - completed
88
99permissions :
10- pull-requests : write
10+ pull-requests : read
1111 actions : read
1212 contents : read
1313
@@ -18,7 +18,7 @@ concurrency:
1818jobs :
1919 find-pr :
2020 runs-on : ubuntu-latest
21- if : ${{ github.event.workflow_run.conclusion == 'failure' }}
21+ if : ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }}
2222 outputs :
2323 pr_number : ${{ steps.pr.outputs.number }}
2424 pr_author : ${{ steps.pr.outputs.author }}
3535 local pr_number="$1"
3636 local pr_author
3737 pr_author=$(gh pr view "$pr_number" --repo "$REPO" --json author --jq '.author.login // empty' 2>/dev/null || echo "")
38- if [ -z "$pr_author" ]; then
39- pr_author="${{ github.event.workflow_run.actor.login }}"
40- echo "::warning::Could not fetch PR author for PR #$pr_number; falling back to @$pr_author"
38+ if [ -z "$pr_author" ] || [ "$pr_author" = "null" ]; then
39+ echo "::warning::Could not fetch PR author for PR #$pr_number"
4140 fi
4241 echo "number=$pr_number" >> "$GITHUB_OUTPUT"
4342 echo "author=$pr_author" >> "$GITHUB_OUTPUT"
6968 call-ci-failure-bot :
7069 needs : find-pr
7170 if : ${{ needs.find-pr.outputs.pr_number != '' }}
71+ permissions :
72+ pull-requests : write
73+ actions : write
74+ contents : read
7275 uses : openwisp/openwisp-utils/.github/workflows/reusable-bot-ci-failure.yml@master
7376 with :
7477 pr_number : ${{ needs.find-pr.outputs.pr_number }}
You can’t perform that action at this time.
0 commit comments