Merged
Conversation
…source tree and file content.
…view command, and enhance user feedback with success messages.
…unction and add tests.
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
This PR introduces major new functionality for repository browsing and code searching, alongside significant improvements to the PR review workflow. It adds two new commands (browse and search) and refactors the pr review command to support both interactive and flag-based workflows.
Key Changes
New Features
browse Command: Added bb browse to quickly open the current repository (or a specific workspace/repo) in the default web browser.
search code Command: Added bb search code to perform code searches across the workspace directly from the CLI.
Supports filtering by file extension (--extension).
Supports scoping to a specific repository (--repo).
Customizable result limits (--limit).
Improvements
Enhanced pr review: The bb pr review command has been refactored to support direct action flags, allowing for non-interactive usage:
--approve: Approve a PR immediately.
--request-changes: Request changes on a PR.
--comment: Post a comment (requires --body).
Retains the existing interactive mode if no flags are provided.
API Client: Added search_code method and improved get_file_content to detect and error gracefully when Bitbucket returns a directory listing as JSON instead of file text.
Documentation: Updated README.md with usage examples for the new commands and configuration.
Fixes & Refactoring
Extracted source URL building logic into the API client for better reusability.
Improved error handling for file viewing commands.
How to Test
Browse: Run bb browse to open the current repo. Run bb browse workspace/repo to open a remote one.
Search: Run bb search code "struct" --extension rs to search for Rust structs.
PR Review:
Run bb pr review --approve on an open PR to test the flag.
Run bb pr review to test the interactive menu.