Add support for backport command (#849)

Fixes https://github.com/eclipse-cdt/cdt/issues/842#issuecomment-2185102917
This commit is contained in:
Jonah Graham 2024-06-28 19:18:00 -04:00 committed by GitHub
parent 597eda2d60
commit 97f3d9a48c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 0 deletions

9
.backportrc.json Normal file
View file

@ -0,0 +1,9 @@
{
"repoOwner": "eclipse-cdt",
"repoName": "cdt",
"targetBranchChoices": ["tycho-cdt_11_6"],
"branchLabelMapping": {
"^backport-to-(.+)$": "$1"
},
"multipleCommits": true
}

25
.github/workflows/backport.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: Automatic backport action
on:
pull_request_target:
types: ["labeled", "closed"]
jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
steps:
- name: Backport Action
uses: sorenlouv/backport-github-action@v9.5.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: backport-to-
add_original_reviewers: true
- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log
- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log