Please note that this project is in active development and several improvements are to be expected in the next weeks/months.
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,
cachePwd: false
},
demo: {
shouldPrompt: false,
shouldPromptDescription: false,
basePath: ''
},
reviewers: {
default: [],
potential: []
},
branches: {
source: {
close: true
},
dest: {
default: ''
}
},
globalVars: {
openFileCommand: ''
}
}
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
- improve password caching procedure
Maintainer
Michel Moreau - michmoreau.l@gmail.com