File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change 4242 # The PR event isn't triggered when the bot opens the PR and as such doesn't trigger the workflows that use the event as their trigger.
4343 # By closing and opening the PR, it forces the PR event to be triggered.
4444 - name : Check if PR is already closed and reopen if necessary
45- id : check_and_reopen_pr
4645 run : |
4746 PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state open --head automation/update_main --json number --jq '.[0].number')
4847 if [ -z "$PR_NUMBER" ]; then
5352 if ! echo "$LABELS" | grep -q "sl-automation-triggered"; then
5453 gh pr close $PR_NUMBER --repo ${{ github.repository }}
5554 gh pr reopen $PR_NUMBER --repo ${{ github.repository }}
56- echo "pr_needs_label=true" >> $GITHUB_OUTPUT
57- else
58- echo "pr_needs_label=false" >> $GITHUB_OUTPUT
5955 fi
6056 env :
6157 GITHUB_TOKEN : ${{secrets.WORKFLOW_TOKEN}}
62-
63- - name : Add label to PR
64- if : ${{ steps.check_and_reopen_pr.outputs.pr_needs_label }}
65- run : |
66- PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --state open --head automation/update_main --json number --jq '.[0].number')
67- gh pr edit $PR_NUMBER --add-label "sl-automation-triggered"
68- env :
69- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments