File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 76
76
echo "workflow_run_id=${{ github.event.workflow_run.id }}" >> $GITHUB_OUTPUT
77
77
fi
78
78
79
+ - name : Check if PR has 'dev: no-bot-comments' label
80
+ if : ${{ github.event_name == 'workflow_dispatch' || (steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true') }}
81
+ id : check-label
82
+ run : |
83
+ has_label=$(gh pr view "${{ steps.set-vars.outputs.pr_number }}" --json labels -q \
84
+ '.labels[].name' | grep -Fxq "dev: no-bot-comments" && echo "true" || echo "false")
85
+ echo "has_label=$has_label" >> "$GITHUB_OUTPUT"
86
+ env :
87
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
88
+
79
89
# This step runs in both cases using the proper variables.
80
90
- name : ghprcomment@main
81
- if : ${{ github.event_name == 'workflow_dispatch' || (steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true') }}
91
+ if : ${{ steps.check-label.outputs.has_label == 'false' && ( github.event_name == 'workflow_dispatch' || (steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true') ) }}
82
92
83
93
with :
84
94
script : https://github.com/koppor/ghprcomment/blob/main/ghprcomment.java
You can’t perform that action at this time.
0 commit comments