Skip to content

Commit 421df7b

Browse files
authored
Merge pull request #2126 from stonebig/master
cycle: open a new changelog PR when the old one is closed
2 parents 7de9a39 + 005c33a commit 421df7b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎.github/workflows/build_winpython_cycle.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ jobs:
281281
git commit -m "Changelogs for $TITLE"
282282
# the branch is generated wholly by this job, so a re-run replaces it
283283
git push --force origin "$branch"
284-
if gh pr view "$branch" --json number >/dev/null 2>&1; then
284+
# gh pr view also finds closed ones, which a re-spin must not reuse
285+
if [ "$(gh pr list --head "$branch" --state open --json number --jq length)" != 0 ]; then
285286
echo "pull request for $branch is open; the push updated it"
286287
else
287288
gh pr create --base "$BASE" --head "$branch" \

0 commit comments

Comments
 (0)