Skip to content

feat: add pr checkout command#9

Open
zoldyzdk wants to merge 1 commit intomainfrom
feat/pr-checkout
Open

feat: add pr checkout command#9
zoldyzdk wants to merge 1 commit intomainfrom
feat/pr-checkout

Conversation

@zoldyzdk
Copy link
Copy Markdown
Owner

Summary

  • Adds bb pr checkout <pr-id> command that fetches a PR's source branch and checks it out locally
  • Creates a git operations module (cmd/git_ops.go) with gitFetch and gitCheckout helpers using os/exec
  • Supports --branch / -b to override the local branch name (defaults to PR source branch)
  • Supports --force / -f to reset an existing local branch to the latest PR state

Closes #3

Test plan

  • bb pr checkout <id> fetches and checks out the PR's source branch
  • Local branch defaults to the PR's source branch name
  • --branch my-name uses custom local branch name
  • --force resets an existing branch
  • Invalid PR ID shows clear error
  • Missing auth shows clear error

Made with Cursor

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.

bb pr checkout <number>

1 participant