-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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 workSolution
Update ParseRepository() in internal/cmdutil/repository.go to:
- Check if the input contains
/- if yes, parse asworkspace/repo(current behavior) - If no
/, check for a default workspace viaconfig.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/commentpipeline list/view/run/stop/steps/logsissue list/view/create/edit/close/reopen/delete/commentbranch list/create/deleterepo view/delete/fork/clone
Additional Changes
- Update help text examples to show that
repo-nameis valid when default workspace is set - Update error message to mention
bb workspace set-defaultas an option
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels