bitbucket-tool-cli
v0.1.0
Published
CLI for Bitbucket Cloud — pull requests, code review, and more
Maintainers
Readme
bitbucket-tool-cli
CLI for Bitbucket Cloud pull request management.
Installation
npx bitbucket-tool-cli pr:list --workspace my-ws --repo my-repoOr install globally:
npm install -g bitbucket-tool-cliCommands
| Command | Description |
|---------|-------------|
| pr:list | List pull requests (alias: prs) |
| pr:create <source> <title> [description] | Create a pull request |
| pr:update <pr-id> | Update or close a pull request |
| pr:comment <pr-id> <comment> | Add a comment to a pull request |
| pr:comments <pr-id> | Get all comments on a pull request |
pr:list
bitbucket-tool-cli pr:list --workspace my-ws --repo my-repo
bitbucket-tool-cli pr:list --state MERGEDOptions:
-s, --state <state>— Filter by state:OPEN,MERGED,DECLINED,SUPERSEDED(default:OPEN)
pr:create
bitbucket-tool-cli pr:create feature/login "Add login page" "Implements OAuth login" \
--workspace my-ws --repo my-repoOptions:
-d, --destination <branch>— Destination branch (default:main)
pr:update
bitbucket-tool-cli pr:update 42 --title "New title" --workspace my-ws --repo my-repo
bitbucket-tool-cli pr:update 42 --closeOptions:
-t, --title <title>— Update PR title-d, --description <desc>— Update PR description--destination <branch>— Update destination branch--close— Close/decline the pull request
pr:comment
bitbucket-tool-cli pr:comment 42 "LGTM" --workspace my-ws --repo my-repopr:comments
bitbucket-tool-cli pr:comments 42 --workspace my-ws --repo my-repoAuthentication
Set one of:
- API token:
BITBUCKET_TOKENenv var - OAuth 2.0:
BITBUCKET_OAUTH_CLIENT_ID+BITBUCKET_OAUTH_CLIENT_SECRET
Optionally set BITBUCKET_WORKSPACE as a default workspace.
License
MIT
