Skip to content

fix: correct double-bump in Version Packages PR title - #61

Merged
gkurt merged 1 commit into
mainfrom
fix-version-pr-title
Jun 30, 2026
Merged

fix: correct double-bump in Version Packages PR title#61
gkurt merged 1 commit into
mainfrom
fix-version-pr-title

Conversation

@gkurt

@gkurt gkurt commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Bug

The versionPr.create() hook added in #60 titled the Version Packages PR chore: release v0.21.0 while the PR actually bumped to v0.20.0.

Cause

create() runs after the draft is applied (the github plugin's applyCliDraft), so this.graph already holds the bumped version. Calling draft.getPackageDraft(...).bumpVersion(pkg) then applied the minor bump a second time: 0.20.0 → 0.21.0. My original validation missed it because it ran against the unapplied draft (graph still at 0.19.0 → 0.20.0).

Fix

Read the already-applied version straight off the graph — no re-bump:

create() {
  const version = this.graph.get('npm:tegaki')?.version;
  return { title: version ? `chore: release v${version}` : 'chore: release' };
},

Reproduced in-memory against a probe changelog: .version0.20.0 (correct), bumpVersion(pkg)0.21.0 (the bug).

Note: the already-merged #59 keeps its wrong title (cosmetic; it bumped 0.20.0 correctly). This prevents it on future releases.

The versionPr.create() hook ran bumpVersion() on the graph package, but
create() fires AFTER the draft is applied — the graph already holds the
bumped version, so bumpVersion bumped it a second time (title said
v0.21.0 while the PR bumped to v0.20.0).

Read the applied version directly from the graph instead. Reproduced in
memory: graph .version = 0.20.0 (correct), bumpVersion(pkg) = 0.21.0 (bug).
@github-actions

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

No changelogs yet

This PR has no pending changelog files. If your changes require a release, add a changelog before merging.

Run bun run tegami locally to create a changelog interactively.

Managed by Tegami.

@gkurt
gkurt merged commit af20b72 into main Jun 30, 2026
5 checks passed
@gkurt
gkurt deleted the fix-version-pr-title branch June 30, 2026 14:17
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