Skip to content

fix(ci): merge the release PR from the push-triggered job - #60

Merged
ericviana merged 1 commit into
mainfrom
eric/fix-release-automerge
Aug 4, 2026
Merged

ericviana merged 1 commit into
mainfrom
eric/fix-release-automerge

Conversation

@ericviana

Copy link
Copy Markdown
Member

The release-auto-merge workflow added in #58 does not work, and I found out the honest way: release 3.1.0 opened its release PR (#59) and then sat there. I merged that one by hand.

Two GitHub behaviors defeat the pull_request-triggered approach:

  1. A workflow run triggered by a bot-authored PR is held as action_required, waiting for a human to approve it. The run for chore(main): release 3.1.0 #59 shows exactly that, so the auto-merge step never executed.
  2. GitHub does not start workflows on a PR opened with the GITHUB_TOKEN, so release PRs never get CI. An auto-merge that waits for required checks would therefore wait forever.

So the merge now happens in publish.yaml, in the same push-triggered job that runs release-please. It looks for an open PR labeled autorelease: pending authored by a bot and squash-merges it. If there is none, it is a no-op.

No loop: merging the release PR pushes to main, which runs this workflow again, and that run produces the GitHub release plus the PyPI publish. At that point there is no pending release PR, so the merge step no-ops.

Also removes the now-dead release-auto-merge.yaml rather than leaving a workflow that can never run.

Verified: yaml.safe_load parses the file and the job's step list is as intended. The real proof is the next release, which should go from a merged sync PR to PyPI with nobody clicking.

https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs

A pull_request-triggered workflow cannot merge release-please's PR: GitHub
holds runs on bot-authored PRs as action_required, and it never starts CI on a
PR the GITHUB_TOKEN opened, so an auto-merge that waits for checks waits
forever. Release 3.1.0 stalled on exactly this.

Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs
@BernardoSM

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ericviana
ericviana merged commit a255d91 into main Aug 4, 2026
8 checks passed
@ericviana
ericviana deleted the eric/fix-release-automerge branch August 4, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants