ci: Bug fix: empty check was missing $

This commit is contained in:
Chris Hennick 2024-05-10 08:44:38 -07:00
parent 8d18f1a7bd
commit 9fa26892fd
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -26,8 +26,11 @@ jobs:
# List all opened PRs which head branch starts with "release-plz-"
release_pr=$(gh pr list --state='open' --json number,headRefName --jq '.[] | select(.headRefName | startswith("release-plz-")) | .number')
# Close the release PR if there is one
if [[ -n "release_pr" ]]; then
if [[ -n "$release_pr" ]]; then
echo "Closing old release PR $release_pr"
gh pr close $release_pr
else
echo "No open release PR"
fi
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_PAT }}