issue-296: MR titles use issue- prefix for git-platform issues #297
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-296/mr-titles-use-issue-prefix-for-git-platform-issues"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
The MR/PR title built in the mr stage was always
<key>: <summary>using the raw issue key. For GitHub/GitLab/Forgejo issues that produced ambiguous bare-number titles (e.g.13: Add login page), while Jira keys were self-evident (ABC-123: ...).This change makes git-platform MR titles use the same key convention as branch names:
issue-<number>: <summary>(e.g.issue-13: Add login page). Jira titles are unchanged. The convention now lives in one shared helper, so branch names and MR titles can't drift apart.Changes
Modified:
src/shared/git/helpers/branchNaming.ts— newbuildIssueKeyLabel(key, provider): Jira key as-is; GitHub/Forgejo/GitLab →issue-<number>.buildBranchNamenow uses it (behaviour unchanged).src/mr/services/runMrStage.ts— MR title is now`${buildIssueKeyLabel(context.key, context.provider)}: ${context.summary}`; comment updated.src/shared/git/index.ts,src/mr/helpers/buildBranchName.ts,src/mr/index.ts— re-export the new helper.Tests (modified):
src/mr/helpers/buildBranchName.test.ts— 4 unit tests forbuildIssueKeyLabel(one per provider family).src/mr/services/runMrStage.test.ts— integration test: a GitHub issue #13 produces titleissue-13: Add login pageand branchfeature/issue-13/add-login-page.Verification
npm run build✓Closes #296