Skip to content

Commit

Permalink
fix: skip PR creation when milestone not set (#7368)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu101 authored Jul 10, 2024
1 parent e32e03d commit 717d589
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/auto-pr-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check for milestone and if release branch exists
continue-on-error: true
id: check_release_branch
run: |
if [ -z "${{ env.MILESTONE }}" ]; then
echo "No milestone set. Exiting."
exit 0
exit 1
fi
RELEASE_BRANCH="release-${{ env.MILESTONE }}"
Expand All @@ -87,10 +88,11 @@ jobs:
echo "RELEASE_BRANCH=${RELEASE_BRANCH}" >> $GITHUB_ENV
else
echo "Release branch $RELEASE_BRANCH does not exist. Exiting."
exit 0
exit 1
fi
- name: Create and push the new branch for the PR
if: ${{ steps.check_release_branch.outcome == 'success' }}
run: |
SEMANTIC_PR_TITLE="${{ env.PR_TITLE }}"
Expand Down

0 comments on commit 717d589

Please sign in to comment.