velero-io/velero

Backport/Cherry-pick GitHub action

Open

#9,603 opened on Mar 10, 2026

View on GitHub
 (1 comment) (0 reactions) (1 assignee)Go (1,550 forks)auto 404
Enhancement/DevGood first issue

Repository metrics

Stars
 (10,111 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the problem/challenge you have

Have to manually git cherry-pick in terminal when something needs to be backported.

This is simple enough that can be automated such that a comment can trigger

Describe the solution you'd like

name: Backport merged pull request
on:
  pull_request_target:
    types: [closed]
  issue_comment:
    types: [created]
permissions:
  contents: write # so it can comment
  pull-requests: write # so it can create pull requests
jobs:
  backport:
    name: Backport pull request
    runs-on: ubuntu-latest

    # Only run when pull request is merged
    # or when a comment starting with `/backport` is created by someone other than the
    # https://github.com/backport-action bot user (user id: 97796249). Note that if you use your
    # own PAT as `github_token`, that you should replace this id with yours.
    if: >
      (
        github.event_name == 'pull_request_target' &&
        github.event.pull_request.merged
      ) || (
        github.event_name == 'issue_comment' &&
        github.event.issue.pull_request &&
        github.event.comment.user.id != 97796249 &&
        startsWith(github.event.comment.body, '/backport')
      )
    steps:
      - uses: actions/checkout@v4
      - name: Create backport pull requests
        uses: korthout/backport-action@v4

Would also be great if it accepts /cherrypick as well, that's what my team is used to in our automation in openshift org repos.

Anything else you would like to add:

Environment:

  • Velero version (use velero version):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • :+1: for "The project would be better with this feature added"
  • :-1: for "This feature will not enhance the project in a meaningful way"

Contributor guide