Skip to content

A label carries no push, so tagpr needs a way to be run by hand - #3

Merged
ken0nek merged 1 commit into
mainfrom
tagpr-dispatch
Sep 2, 2026
Merged

ken0nek merged 1 commit into
mainfrom
tagpr-dispatch

Conversation

@ken0nek

@ken0nek ken0nek commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Adds workflow_dispatch to tagpr.yml, and records why a non-patch bump needs it.

The bug

tagpr reads the tagpr:minor / tagpr:major label when it runs, and its only trigger was push on main. Labelling carries no push, so the ordering is a trap:

  1. Merge the last feature PR → push to main → tagpr updates the release PR at the patch default.
  2. Label it tagpr:minor.
  3. Nothing pushes to main again — the release PR is the next merge.
  4. tagpr never re-reads the label, and the merge tags a patch.

Hit for real on the v0.3.0 release: the label sat correctly applied and completely inert until the previous run was replayed by hand. It self-heals only if another feature PR happens to be merged after labelling, which is the opposite of the natural order.

Why not pull_request: labeled

It would automate this, and it is the wrong tool. That event checks out the pull request HEAD, so labelling any feature PR would point tagpr at a feature branch — the run the trigger comment in this file already rules out. Guarding it takes a head_ref condition plus a pinned checkout ref; workflow_dispatch takes one line and has no such edge.

The release step is now: label → gh workflow run tagpr.yml. CLAUDE.md's version-pin rule says so too, since that is where a release is looked up.

Testing

test/all.sh green. No behavior change outside CI configuration.

tagpr reads the major/minor label WHEN IT RUNS, and its only trigger was a
push to main. The release pull request is the next thing merged after the last
feature merge, so labelling it `tagpr:minor` fired nothing and the merge would
have tagged a patch. Measured: the label sat correctly applied and inert until
the previous run was replayed.

workflow_dispatch rather than `pull_request: labeled`, which would automate it
and check out the pull request HEAD -- a tagpr run on a feature branch, which
the trigger comment already rules out.
@ken0nek ken0nek self-assigned this Sep 2, 2026
@ken0nek
ken0nek merged commit eb01b56 into main Sep 2, 2026
2 checks passed
@ken0nek
ken0nek deleted the tagpr-dispatch branch September 2, 2026 05:01
@github-actions github-actions Bot mentioned this pull request Sep 2, 2026
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.

1 participant