New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bbpr

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bbpr

Make pull requests through the Bitbucket API 2.0 from your terminal

  • 3.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-81.82%
Maintainers
1
Weekly downloads
 
Created
Source

Please note that this project is in active development and several improvements are to be expected in the next weeks/months.


bbpr

Light Speed Pull Requests from Your Terminal

Synopsis

bbpr (BitBucket Pull Requests) is a cross-platform, interactive, configurable, and fast command line program helping you standardize the pull request process between teammates. It is very easy to forget little details when doing a pull request, like a reviewer you had to add, or a description along your demo helping your teammates understand what they should review and where they should look for it. bbpr partners up with you on that journey, so that your future pull requests will always be picture perfect.

How it works

When you start a bbpr session, you simply answer questions about your upcoming PR so that bbpr can build it for you. Once you are done answering the questions, you can review all the information before sending your PR. Once you confirm each piece of information is accurate, bbpr sends the pull request and redirects you to BitBucket if it is successful. If not, you will receive information about why it failed, and you'll be able to adjust. It's that simple.

Installation

Step 1: Prerequisites

First, make sure you have the following installed on your computer: node.js, npm, and git or mercurial depending on which version control system your team is using.

Step 2: Npm Install

The very best way to use the latest version of bbpr is to install it globally on your computer:

npm install -g bbpr

Congratulations, bbpr is now installed properly and you can instantly use the bbpr terminal command from any local Mercurial repository linked to a remote BitBucket repository. However, a more useful way to use bbpr is to configure it to your personal profile and taste.

Use and Configuration

bbpr comes bundled with a global configuration file (bbpr.config.js) by default. That being said, it is recommended that you enter some information in it so it becomes faster to build your pull requests by being prompted with less questions to answer. You can edit your global bbpr configuration file (bbpr.config.js) any time with the following bbpr command options:

bbpr --cg - opens your global configuration file so you can edit it manually.

bbpr --cg reset - resets your global configuration file to the default configuration file.

bbpr --cg allTrue - fill your global configuration file with valid and positive values for each config property.

bbpr --cg <path to a local config js file> - replaces your current global config file with the local config file specified.

bbpr --cg <path to a remote (http/https) config js file> - replaces your current global config file with the remote config file specified.

bbpr --init - initialize a bbpr.config.js file in your local directory.

bbpr --cl - opens your local configuration file so you can edit it manually.

bbpr --cl reset - resets your local configuration file to the default configuration file.

bbpr --cl allTrue - fill your local configuration file with valid and positive values for each config property.

bbpr --cl <path to a local config js file> - replaces your current local config file with the local config file specified.

bbpr --cl <path to a remote (http/https) config js file> - replaces your current local config file with the remote config file specified.

bbpr now also supports local configuration for each of your bitbucket repositories. To use this feature, simply add a valid bbpr.config.js configuration file at the root level of your repository.

Default configuration file overview:

module.exports = {
  user: {
    password: null, // null or String.
        // If null and cachePwd is set to true, this property will be set to the (encrypted) password you entered via the prompt for your next BBPR sessions.
        // If not null and cachePwd is set to true, it will use the encrypted password stored in this property.
        // In any other case, you will be prompted at each BBPR session to provide your BitBucket password.
    cachePwd: false // Boolean. See the password property for detailed explanation.
  },
  demo: {
    shouldPrompt: false, // Boolean. Set to true if you'll need a demo link with your PR.
    shouldPromptDescription: false, // Boolean. Set to true if you'll need a description with your demo.
    basePath: '' // String. Base path to your demo (ex. https://mydemo.com/). Provide only if needing a demo. It will be ignored otherwise.
  },
  reviewers: {
    default: [], // Array of String. Each entry must be a valid BitBucket username. These are the reviewers who are assign to reviewing your work. An empty Array is also valid.
    potential: [] // Array of String. Each entry must be a valid BitBucket username. These are the reviewers who may be assigned to reviewing your work. An empty Array is also valid.
  },
  branches: {
    source: {
      close: true // Boolean. Set to false if you do not want your source branch to be closed after merging in the destination branch.
    },
    dest: {
      default: '' // String. Set to your main branch (ex: master or default), or the branch to which you are making PRs most often. Defaults to default for Mercurial and master for Git
    }
  },
  globalVars: {
    openFileCommand: '' // String. Your preferred terminal command to open your config file (javascript file). BBPR uses a default command according to your platform if empty.
  }
}

Once you configured bbpr to your taste, you are ready to go. You can run bbpr from any local repository for which you want to make a pull request, and a session will start.

That's it, may you and your teammates enjoy the bbpr way of doing BitBucket pull requests!

How to contribute

Please do not hesitate to make any change at any time to bbpr by submitting a pull request, an issue, or any suggestion for improvements you might have.

Roadmap

  • eliminate the need to provide organization name and username - DONE
  • add local bbpr.config.js file initialization terminal option - DONE
  • allow configuration file to be set from a remote or local file - DONE
  • better error messages on failed pull request - DONE
  • allow git repositories to be handled - DONE
  • better commandline options for configuration (local and global) DONE
  • fix pre-install and post-install script to preserve global config file of users DONE
  • rethink demo link options
  • improved readme with more information, code examples, and cross-platform compatibility
  • allow users to have local bbpr.config.js file for their repositories - DONE
  • reduce shelljs and bash dependency for before module install and after module install DONE
  • eliminate bash dependency for password caching DONE
  • unit tests everything - IN PROGRESS
  • allow PR updates through bbpr more explicitly
  • check if destination branch exists remotely before making pull request
  • improve normalization of configuration file
  • allow local and global password caching (only global supported currently)

Maintainer

Michel Moreau - michmoreau.l@gmail.com

Keywords

FAQs

Package last updated on 27 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc