Light Speed Pull Requests from Your Terminal
Synopsis
BBPR (BitBucket Pull Requests) is an 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, git, and mercurial.
Step 2: Clone and Install
Move to the directory level where the repositories you are working on are located, and clone this github repository with the following command:
git clone https://github.com/MichelML/bbpr.git
After this command is executed, move to the local directory and install all dependencies:
cd bbpr && npm install
Congratulations, BBPR is now installed properly.
Use and Configuration
BBPR comes bundled with a configuration file (bbpr.config.js
) by default. That being said, you must absolutely provide a BitBucket organization name (ex: mycompanyid) before using BBPR. Your BitBucket organization name is the only required entry you must provide by hand, otherwise the program will throw.
Default configuration file overview:
{
"organization": {
"name": ""
},
"user": {
"name": "",
"password": null,
"cachePwd": false
},
"demo": {
"shouldPrompt": false,
"shouldPromptDescription": false,
"basePath": ""
},
"reviewers": {
"default": [],
"potential": []
},
"branches": {
"source": {
"close": true
},
"dest": {
"default": "default"
}
}
}
Once this step is done, you are ready to go. You can run node <path to your local bbpr>/bbpr
from within your local repository for which you want to make a pull request, and a session will start. If you cloned BBPR at the location suggested in the install section, simply running node ../bbpr
should work flawlessly.
That's it, may you and your teammates enjoy the BBPR way of doing BitBucket pull requests!
Contribute
Please do not hesitate to make any change at any time to BBPR by submitting a pull request.
Maintainer
Michel Moreau - mmlapointe@coveo.com