Skip to content

fix(branch-prefix): recognize GitHub PR merge subject#7

Merged
lesnik512 merged 1 commit into
mainfrom
bugfix/branch-prefix-github-merge-subject
Jun 8, 2026
Merged

fix(branch-prefix): recognize GitHub PR merge subject#7
lesnik512 merged 1 commit into
mainfrom
bugfix/branch-prefix-github-merge-subject

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

The branch-prefix strategy gated on subject containing "Merge branch" (GitLab's default merge format). GitHub's PR merges use "Merge pull request #N from OWNER/BRANCH", which doesn't contain that string — so every GitHub Actions user silently no-op'd with status=no_merge_commit even on real merges. Surfaced by dogfooding this repo (PR #6, which merged but didn't tag).

  • Rename BranchPrefixConfig.merge_mark_text: str = "Merge branch"merge_mark_texts: tuple[str, ...] = ("Merge branch", "Merge pull request")
  • Strategy now checks any(mark in subject for mark in self.config.merge_mark_texts)
  • Two new tests confirm GitHub and GitLab merge subjects both bump correctly under defaults
  • Docs updated to drop the "GitHub doesn't work under defaults" warning

Breaking change for anyone overriding the old field. Acceptable pre-1.0 on a config knob the documented use case for is "non-default merge conventions" — nobody is doing that in the wild.

This PR's source branch is bugfix/..., so once it merges and 0.3.1 publishes, the dogfood workflow's NEXT run should successfully patch-bump to 0.3.2.

Test plan

  • just test — 420 pass (+3 new), 100% coverage
  • just lint-ci — clean
  • mkdocs build --strict — clean
  • Merge → dogfood workflow runs against THIS PR's bugfix/ merge commit using OLD 0.3.0 (still fails the same way — fix isn't on PyPI yet)
  • Cut 0.3.1 release → publish.yml fires → 0.3.1 on PyPI
  • Next merge into main (any feat/ or bugfix/...) → dogfood resolves 0.3.1 via >=0.3,<1 → auto-tags

🤖 Generated with Claude Code

semvertag's branch-prefix strategy gated on the subject containing the
literal string "Merge branch" — GitLab's default merge format. GitHub's
PR-merge commits use "Merge pull request #N from OWNER/BRANCH" instead,
which doesn't contain "Merge branch", so every GitHub Actions consumer
of branch-prefix silently no-op'd with status=no_merge_commit even on
real merge commits.

Surfaced by dogfooding semvertag 0.3.0 on this repo's own CI (PR #6).

Fix: rename `merge_mark_text: str` to `merge_mark_texts: tuple[str, ...]`
defaulting to `("Merge branch", "Merge pull request")`; strategy now
matches if any mark appears in the subject. Out-of-the-box correct for
both providers.

Breaking change for anyone overriding the old `merge_mark_text` env/config
field — the rename to plural-tuple requires updating
`SEMVERTAG_BRANCH_PREFIX__MERGE_MARK_TEXT="X"` to
`SEMVERTAG_BRANCH_PREFIX__MERGE_MARK_TEXTS='["X"]'`. Acceptable pre-1.0
on an internal config knob nobody has had a chance to override in the
wild (the field shipped post-bmad in v0.1.0 with no documented use case).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit c0fcc55 into main Jun 8, 2026
5 checks passed
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