New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

backport-github-action

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backport-github-action

By merging a pull request with the labels `backport-to-staging` and `backport-to-production` Backport Github Action (BGA) will automatically create backport pull requests to the branches "staging" and "production".

  • 1.0.27
  • beta
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

This Github Action will automatically create backport pull request when a pull request is merged, based on the labels it contains.

Example

By merging a pull request with the labels backport-to-staging and backport-to-production Backport Github Action (BGA) will automatically create backport pull requests to the branches "staging" and "production".

How to use

Add the backport workflow to .github/workflows/backport.yml:

name: Backport
on:
  pull_request_target:
    types:
      - closed
      - labeled

jobs:
  backport:
    name: Backport Action
    runs-on: ubuntu-latest
    steps:
      - name: Backport
        uses: sqren/backport-github-action@v1
        with:
          # Required
          # Token to authenticate requests
          access_token: ${{ secrets.GITHUB_TOKEN }}

          # Required
          # Backport PR by adding a label
          # Example: PRs labeled with "backport-to-staging" will be backported to "staging"
          backport_by_label: '^backport-to-(.*)$'

          # Optional
          # Title for the backport PR
          # Example: [branch-a] My commit msg
          # pr_title: '[{targetBranch}] {commitMessages}'

          # Optional
          # Comma separated list of labels that will be added to the backport PR.
          # target_pr_labels: 'backport'

Backport CLI (optional)

Backport CLI is a tool that makes it much easier to create ad-hoc backport pull requests. This integrates seemlessly with the Backport Github Action. All you need to do is to add a backport configuration file to the repository root:

// .backportrc.json
{
  "upstream": "<repo name>/<repo owner>",
  "targetBranchChoices": ["master", "staging", "production", "<any other branch>"] 
}

FAQs

Package last updated on 13 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc