Light Speed Pull Requests from Your Terminal
Synopsis
bbpr (BitBucket Pull Requests) is a cross-platform, interactive, configurable program helping you making pull requests from your terminal.
A positive side effect of using bbpr is that it can also help you standardize the pull request process across members of your team.
Forgetting little details when doing a pull request is very easy (forgetting to add a reviewer, not providing detailed specifications helping your teammates understand where they should focus their attention while reviewing, etc). bbpr wants to partner up with you on that journey, so that your future pull requests will always be picture perfect.
Installation
Prerequisites
First, make sure you have the latest stable versions of the following programs installed on your computer: node.js, npm, and git or mercurial depending on which version control system your team is using.
Install globally
The very best way to use the latest version of bbpr is to install it globally on your computer:
npm install -g bbpr
then you can use the bbpr
command from your terminal. But, read along, there is more.
Use and Configuration
Usage
bbpr comes bundled with a global configuration file (bbpr.config.js
) by default, which means you can use it right after installing the module globally on your computer. bbpr also leaves you with a series of commandline options in order to configure the program to your taste:
Command | Description |
---|
bbpr | Starts the interactive pull request process.
bbpr first looks locally for a configuration file, and defaults to the global configuration file if it does not find one. Note that cached passwords are however always retrieved from the global configuration file. |
bbpr init | Initializes a local bbpr configuration file for your repository. |
bbpr -l | Opens your local bbpr configuration file. |
bbpr -l reset | Resets your local bbpr configuration file to the default configuration. |
bbpr -l <path to configuration file> | Sets your local bbpr configuration file to the file specified. The specified path can be relative, absolute, or remote (http/https). |
bbpr -g | Opens your global bbpr configuration file. |
bbpr -g reset | Resets your global bbpr configuration file to the default configuration. |
bbpr -g <path to configuration file> | Sets your global bbpr configuration file to the file specified. The specified path can be relative, absolute, or remote (http/https). |
Configuration file
Here are all the properties you can set in your bbpr.config.js
configuration file, whether global or local:
module.exports = {
user: {
password: null,
cachePwd: false
},
demo: {
shouldPrompt: false,
shouldPromptDescription: false,
demoIntro: '',
basePath: '',
pathVariables: {
repositoryName: null,
repositoryOwner: null,
pullRequestAuthor: null,
sourceBranch: null,
destinationBranch: null
}
},
reviewers: {
default: [],
potential: []
},
branches: {
source: {
close: true
},
dest: {
default: ''
}
},
globalVars: {
openFileCommand: ''
}
}
How to contribute
Ideas and suggestions are strongly encouraged. What would be your needs?
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 DONE
- 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
- improve password caching procedure DONE
- improved readme with more information, code examples, and cross-platform compatibility
- unit tests everything - IN PROGRESS
- allow PR updates through bbpr more explicitly
- beautify code
- check if destination branch exists remotely before making pull request
- improve normalization of configuration file
- support github repositories
Maintainer
Michel Moreau - michmoreau.l@gmail.com