Giter VIP home page Giter VIP logo

github-action-cherry-pick's Introduction

Cherry-Pick Github Action

Github Action to Cherry Pick commits from a branch (generally, master) and create a PR on another branch (Release branch).

Most of the projects have Release branches and master branch. Master branch is where developers works on but we want to push the changes to the Release branches too.

Action

  • Push to the monitored branch X
  • Get the last commit SHA
  • Checkout the other branch, Y
  • Create a new pr branch Z on the branch Y
  • Cherry Pick the commits from X into Z
  • Push the branch and create the PR on base Y
  • PR title will be prefixed with AUTO

Conditions:

  • If base branch commit contains AUTO, it wont recreate the PR.

Inputs

pr_branch

Required The branch name of on which PR should be created from the cherry-pick commit.

pr_labels

CSV Labels to apply on the PR created. Default: autocreated

Example usage

In this example, all the merges to the branch 0.1.0 will create a PR on 0.1.X branch too.

name: PR for release branch
on:
  push:
    branches:
      - 0.1.0
jobs:
  release_pull_request:
    runs-on: ubuntu-latest
    name: release_pull_request
    steps:
    - name: checkout
      uses: actions/checkout@v1
    - name: Create PR to branch
      uses: gorillio/github-action-cherry-pick@master
      with:
        pr_branch: '0.1.x'
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GITBOT_EMAIL: <BOT_EMAIL>
        DRY_RUN: false

github-action-cherry-pick's People

Contributors

himadrisingh avatar borda 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.