A simple CLI tool for backporting commits
npm install -g backport
> backport
The first time you run backport
a skeleton configuration file will be created in /<homedir>/.backport/config.json
.
You need to update the config file with your Github username and a Github Access Token (can be created here).
View config sample
{
// Github personal access token. Create here: https://github.com/settings/tokens/new
// Please check "Full control of private repositories"
"accessToken": "",
// Github username, eg. kimchy
"username": "",
// Only allow picking own commits to backport
"own": true,
// Allow picking multiple versions to backporting to
"multiple": true,
// Repositories and the versions that will be available in backport cli
"repositories": [
{
"name": "elastic/elasticsearch",
"versions": ["6.x", "6.0", "5.6", "5.5", "5.4"]
},
{
"name": "elastic/kibana",
"versions": ["6.x", "6.0", "5.6", "5.5", "5.4"],
"labels": ["backport"]
}
]
}
backport
never touches your local repositories or files. Instead a separate clone of your repositories are created in /<homedir>/.backport/repositories/
. This is also where you'll need to solve merge conflicts.
If you are experiencing issues, you can try deleting the repository, or the entire .backport
folder - it will be recreated next time you run backport
.