Skip to content

feat: add pr diff command with --name-only#10

Merged
zoldyzdk merged 1 commit intomainfrom
feat/pr-diff
Apr 17, 2026
Merged

feat: add pr diff command with --name-only#10
zoldyzdk merged 1 commit intomainfrom
feat/pr-diff

Conversation

@zoldyzdk
Copy link
Copy Markdown
Owner

Summary

  • Adds bb pr diff <pr-id> command that retrieves and displays the raw unified diff from the Bitbucket API
  • Adds GetRaw method to the API client for non-JSON endpoints (returns raw response body as string)
  • Adds GetPullRequestDiff API method calling GET /repositories/{w}/{r}/pullrequests/{id}/diff
  • Supports --name-only flag to display only changed file paths (parses unified diff format)

Closes #4

Test plan

  • bb pr diff <id> outputs raw unified diff
  • bb pr diff <id> --name-only outputs only file paths (one per line)
  • Handles deleted files (extracts from --- a/ when +++ /dev/null)
  • Invalid PR ID shows clear error
  • Missing auth shows clear error

Made with Cursor

@zoldyzdk zoldyzdk merged commit e0c404b into main Apr 17, 2026
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 diff <number> with --name-only

1 participant