Git Product home page Git Product logo

sync-branches's Introduction

sync-branches

GitHub Action to sync one branch when another is updated.

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.

FROM_BRANCH

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

TO_BRANCH

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

PULL_REQUEST_TITLE

What you would like as the title of the pull request.

Default: sync: {FROM_BRANCH} to {TO_BRANCH}

PULL_REQUEST_BODY

What you would like in the body of the pull request.

Default: sync-branches: New code has just landed in {FROM_BRANCH} so let's bring {TO_BRANCH} up to speed!

PULL_REQUEST_IS_DRAFT

Set to true for the pull request to be opened as a draft.

Default: false

CONTENT_COMPARISON

Set to true to force checking content comparison between branches. No more empty pull requests being opened and triggering CI jobs.

Default: false

REVIEWERS

JSON array of GitHub user logins that will be requested to review the PR.

Example: '["tretuna"]'

Default: []

TEAM_REVIEWERS

JSON array of GitHub team slugs that will be requested to review the PR.

Example: '["js-team"]'

Default: []

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 usage

name: Sync
on:
  push:
    branches:
      - main

jobs:
  sync-branches:
    runs-on: ubuntu-latest
    name: Syncing branches
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up Node
        uses: actions/setup-node@v1
        with:
          node-version: 12
      - name: Opening pull request
        id: pull
        uses: tretuna/[email protected]
        with:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
          FROM_BRANCH: "main"
          TO_BRANCH: "develop"

sync-branches's People

Contributors

tretuna avatar dependabot[bot] avatar lfkwtz avatar freitasmurillo avatar reiked avatar dsambugaro avatar fabidick22 avatar igorpoltosi avatar justjenfelice 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.