Giter Site home page Giter Site logo

shailesh351 / create-catchup-pr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from widechat/create-catchup-pr

0.0 2.0 0.0 843 KB

GitHub Action to create pull request from a branch to another across forks.

License: MIT License

JavaScript 100.00%

create-catchup-pr's Introduction

Create Catchup PR

GitHub Action to sync branchs with one source branch across different forks. First a new branch is created from source then PR is created between new branch and target branch. New branch is created so that you can fix conflicts if any cause source branch might be protected in some case. To work properly delete created branches after merging them.

Inputs

GITHUB_TOKEN

Required The token to be used for creating the pull request. Can be set to the one given for the workflow or another user.

GITHUB_REPO

Required Github repo with owner name. ${{ github.repository }}

SOURCE_BRANCH

Required The branch you want to make the pull request from.

SOURCE_REPO

Optional The repo you want to make the pull request from.

TARGET_BRANCH

Required The branchs you want to make the pull request to. Multiple branches need to be separate by comma like in example

TITLE

Optional Title for the pull request

BODY

Optional Body for the pull request

DRAFT

Optional To create a draft pull request (value: "true"/"false", default: "false").

Outputs

PULL_REQUEST_URL

Set to the URL of either the pull request that was opened by this action or the one that was found to already be open between the two branches.

PULL_REQUEST_NUMBER

Pull request number from generated pull request or the currently open one

Example

name: Sync
on:
  push:
    branches:
      - master

jobs:
  sync-branches:
    runs-on: ubuntu-latest
    name: Catching up branches
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up Node
        uses: actions/setup-node@v1
        with:
          node-version: 12
      - name: Create Catchup PR
        uses: shubhsherl/[email protected]
        with:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
          GITHUB_REPO: ${{github.repository}}
          SOURCE_REPO: "octocat"
          SOURCE_BRANCH: "master"
          TARGET_BRANCH: "develop,experiment"

Modified version of action Create Sync PR with support of creating pr from different forks.

create-catchup-pr's People

Contributors

dependabot[bot] avatar shubhsherl avatar

Watchers

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