node-bb-cli

1.3.0 • Public • Published

Node BB

This is a CLI tool to work with Bitbucket from the Command Line

Install

  • npm install -g node-bb-cli

Use

The first time you use it you will be prompted to introduce your bitbucket username and your APP Pasword to use as a token. You can find how to create it here

Run bb -h to see the available commands

bb pr list

bb pr list [flags]

List all the pull requests for the repo

bb pr [number]

bb pr [number] [flags]

Download the branch of the specified pull request into a local branch with the name pr-[number]

bb pr create

bb pr create [flags]

Create a pull request on Bitbucket.

When the current branch isn't fully pushed to a git remote, a prompt will ask where to push the branch and offer an option to fork the base repository.

A prompt will also ask for the title and the body of the pull request. Use --title and --body to skip this.

Options

-B, --base <branch> The branch into which you want your code merged

-b, --body <string> Body for the pull request

-H, --head <branch> The branch that contains commits for your pull request (default: current branch)

-t, --title <string> Title for the pull request

-R, --repo <OWNER/REPO> Select another repository using the OWNER/REPO format

Examples

$ bb pr create --title "feat: add this new feature" --body "The feature is featuring"
$ bb pr create --base feat-feature --head develop

In use

Interactively

Create a pull request interactively

~/Projects/my-project$ bb pr create
Creating pull request for feature-branch into main in owner/repo
? Title My new pull request
? Body My new pull request body
? There is no upstream configured for the selected branch.
Do you want to configure it and push the cuatrov branch to owner/repo? Yes
Creating Pull Request...
Pull Request created: http://bitbucket.org/owner/repo/pull/1

Readme

Keywords

none

Package Sidebar

Install

npm i node-bb-cli

Weekly Downloads

1

Version

1.3.0

License

BSD-3-Clause

Unpacked Size

47.1 kB

Total Files

25

Last publish

Collaborators

  • carloslancha