File tree 1 file changed +11
-4
lines changed 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,20 @@ jobs:
66
66
env :
67
67
GITHUB_TOKEN : ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
68
68
69
- - name : Check for existing Freeze Scheduled Release PR
69
+ - name : Check for existing Freeze Scheduled Release PR and skip if exists
70
70
if : ${{ github.event_name == 'schedule' }}
71
71
run : |
72
- FREEZE_PR=$(gh pr list --label "Freeze: Scheduled Release" --state open --json number --jq '.[0].number // empty')
73
- if [ ! -z "$FREEZE_PR" ]; then
72
+ # Check if there is an open pull request labeled "Freeze: Scheduled Release"
73
+ freeze_pr_number=$(gh pr list \
74
+ --label "Freeze: Scheduled Release" \
75
+ --state open \
76
+ --json number \
77
+ --jq '.[0].number // empty')
78
+
79
+ # If there is an open PR with the "Freeze: Scheduled Release" label, skip scheduled release.
80
+ if [ -n "$freeze_pr_number" ]; then
74
81
echo "Found existing PR with 'Freeze: Scheduled Release' label. Skipping scheduled release..."
75
- echo "PR: https://github.com/${{ github.repository }}/pull/$FREEZE_PR "
82
+ echo "PR: https://github.com/${{ github.repository }}/pull/$freeze_pr_number "
76
83
exit 1
77
84
fi
78
85
env :
You can’t perform that action at this time.
0 commit comments