Skip to content

Commit

Permalink
Only edit open pull requests on auto upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sertonix committed Jul 31, 2024
1 parent 31b244a commit 32dba55
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ jobs:
git push --force -u origin '${{ env.UPGRADE_BRANCH }}'
# Edit pull request when it already exists otherwise create a new one
gh pr edit '${{ env.UPGRADE_BRANCH }}' --title "$msg" ||
gh pr create --head '${{ env.UPGRADE_BRANCH }}' --body '' --title "$msg"
number=$(gh pr list --limit 1 --head '${{ env.UPGRADE_BRANCH }}' --state open --json number -q '.[0].number // ""')
echo "$number"
if [ -n "$number" ]; then
gh pr edit '${{ env.UPGRADE_BRANCH }}' --title "$msg"
else
gh pr create --head '${{ env.UPGRADE_BRANCH }}' --body '' --title "$msg"
fi

0 comments on commit 32dba55

Please sign in to comment.