[feat] Support changing branch type (prefix) in rimba rename#341
Merged
Conversation
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
Also adds --feature note to rename docs (no flag exists for reverting to feature/ prefix).
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
| } | ||
|
|
||
| _, task = operations.ResolveTaskInput(task, repoRoot) | ||
| _, newTask = operations.ResolveTaskInput(newTask, repoRoot) |
Owner
Author
There was a problem hiding this comment.
Medium (advisory): ResolveTaskInput is called on newTask here but the source task goes through findWorktree which internally re-resolves it. The code is functionally correct — monorepo inputs like auth-api/login work correctly because findWorktree handles the service prefix. The asymmetry is subtle though: a reader of this function must trace into findWorktree to understand why task doesn't also go through ResolveTaskInput at this call site. Consider explicitly resolving both here and passing the resolved task to findWorktree so the data flow is auditable in one place. Not a blocker, just a readability note.
Also documents bare-branch promotion behavior in rename.md intro.
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
lugassawan
commented
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RenameParamsstruct tointernal/operations/rename.go(NewPrefix ""= inherit from branch)rimba renameto accept an optional[new-task]arg and prefix flags (--bugfix,--hotfix,--docs,--test,--chore) so users can change the branch type without recreating the worktreefeature/auth -> bugfix/auth) instead of task names"nothing to change: branch is already <branch>"(exit 1)Test Plan
make test)make lint)make test-e2e)Type-tailored checks ([feat])
rimba rename auth --bugfix→bugfix/authbranch andbugfix-authdir created;feature/authgonerimba rename auth login --bugfix→bugfix/login(rename + retype in one step)rimba rename auth(no flag, no change) → exit 1, stderr contains"nothing to change"TestRenamePreservesPrefixstays green)Issue
Closes #329