From 97f3d9a48c67711fbaa2cb51aa9b092cf47a265c Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Fri, 28 Jun 2024 19:18:00 -0400 Subject: [PATCH] Add support for backport command (#849) Fixes https://github.com/eclipse-cdt/cdt/issues/842#issuecomment-2185102917 --- .backportrc.json | 9 +++++++++ .github/workflows/backport.yml | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .backportrc.json create mode 100644 .github/workflows/backport.yml diff --git a/.backportrc.json b/.backportrc.json new file mode 100644 index 00000000000..603c8669158 --- /dev/null +++ b/.backportrc.json @@ -0,0 +1,9 @@ +{ + "repoOwner": "eclipse-cdt", + "repoName": "cdt", + "targetBranchChoices": ["tycho-cdt_11_6"], + "branchLabelMapping": { + "^backport-to-(.+)$": "$1" + }, + "multipleCommits": true +} diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000000..f165a5f4e15 --- /dev/null +++ b/.github/workflows/backport.yml @@ -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