diff --git a/.backportrc.json b/.backportrc.json new file mode 100644 index 00000000..133b70f9 --- /dev/null +++ b/.backportrc.json @@ -0,0 +1,18 @@ +{ + "repoOwner": "elastic", + "repoName": "rally-tracks", + "targetBranchChoices": [ + "8.15", + "8.14", + "8.13" + ], + "targetPRLabels": [ + "backport" + ], + "branchLabelMapping": { + "^backport-to-(.+)$": "$1" + }, + "autoMerge": true, + "autoMergeMethod": "squash", + "prDescription": "{defaultPrDescription}\n\n" +} diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..4e139fea --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,27 @@ +name: Automatic backport action + +on: + pull_request_target: + branches: ['master'] + types: ["labeled", "closed"] + +jobs: + backport: + name: Backport PR + runs-on: ubuntu-latest + if: | + github.event.pull_request.merged == true + && !contains(github.event.pull_request.labels.*.name, 'backport') + steps: + - name: Backport Action + uses: sorenlouv/backport-github-action@v9.5.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Info log + if: ${{ success() }} + run: cat ~/.backport/backport.info.log + + - name: Debug log + if: ${{ failure() }} + run: cat ~/.backport/backport.debug.log