Problem
When a user has a default workspace configured, they still need to provide the full workspace/repo format for commands that take a --repo flag:
$ bb workspace set-default
Default workspace: hudle
$ bb pr list --repo laravel-12
✗ invalid repository format: laravel-12 (expected workspace/repo)
Expected Behavior
If a default workspace is set and the user provides just a repo name (without /), the CLI should use the default workspace:
$ bb pr list --repo laravel-12
# Should resolve to hudle/laravel-12 and work
Solution
Update ParseRepository() in internal/cmdutil/repository.go to:
- Check if the input contains
/ - if yes, parse as workspace/repo (current behavior)
- If no
/, check for a default workspace via config.GetDefaultWorkspace()
- If default workspace exists, return
(defaultWorkspace, repoFlag, nil)
- If no default workspace, return error suggesting to set one
Impact
This single change would improve UX for ALL commands that use --repo:
pr list/view/create/edit/merge/close/reopen/checkout/diff/checks/comment
pipeline list/view/run/stop/steps/logs
issue list/view/create/edit/close/reopen/delete/comment
branch list/create/delete
repo view/delete/fork/clone
Additional Changes
- Update help text examples to show that
repo-name is valid when default workspace is set
- Update error message to mention
bb workspace set-default as an option
Problem
When a user has a default workspace configured, they still need to provide the full
workspace/repoformat for commands that take a--repoflag:Expected Behavior
If a default workspace is set and the user provides just a repo name (without
/), the CLI should use the default workspace:$ bb pr list --repo laravel-12 # Should resolve to hudle/laravel-12 and workSolution
Update
ParseRepository()ininternal/cmdutil/repository.goto:/- if yes, parse asworkspace/repo(current behavior)/, check for a default workspace viaconfig.GetDefaultWorkspace()(defaultWorkspace, repoFlag, nil)Impact
This single change would improve UX for ALL commands that use
--repo:pr list/view/create/edit/merge/close/reopen/checkout/diff/checks/commentpipeline list/view/run/stop/steps/logsissue list/view/create/edit/close/reopen/delete/commentbranch list/create/deleterepo view/delete/fork/cloneAdditional Changes
repo-nameis valid when default workspace is setbb workspace set-defaultas an option