GithubHelp home page GithubHelp logo

vanjacosic / backport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sorenlouv/backport

0.0 1.0 0.0 218 KB

Automate the tedious process of backporting commits to version branches

License: Apache License 2.0

JavaScript 100.00%

backport's Introduction

backport

Build Status dependencies Status Coverage Status NPM version code style: prettier

A simple CLI tool for backporting commits

Demonstration gif

Install

npm install -g backport

Usage

> backport

Options

Option Description Accepts
--multiple Backport multiple commits and/or branches boolean
--multiple-commits Backport multiple commits boolean (defaults to false)
--multiple-branches Backport to multiple branches boolean (defaults to true)
--own Only show own commits boolean (defaults to true)
--show-config Show configuration
--sha Commit sha to backport string
--help Show help
-v, --version Show version number

Configuration

Global Config

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.json" 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": "",

  // Override project-specific setting
  "projects": [
    {
      "upstream": "elastic/kibana",
      "branches": ["6.x", "6.1", "6.0"]
    }
  ]
}

Project-specific config

Add .backportrc.json to the root of your project with the following structure:

View ".backportrc.json" sample
{
  "upstream": "elastic/kibana",

  // You can pre-select branches you use often
  "branches": [
    { "name": "6.x", "checked": true },
    { "name": "6.1", "checked": true },
    "6.0"
  ],

  // Only allow picking own commits to backport
  "own": true,

  // Backport multiple commits
  "multipleCommits": false,

  // Backport to multiple branches
  "multipleBranches": true,

  // Labels will be added to the PR
  "labels": ["backport"]
}

Troubleshooting

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.

backport's People

Contributors

cjcenizal avatar greenkeeper[bot] avatar sorenlouv avatar spalger avatar w33ble avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.