diff --git a/.backportrc.json b/.backportrc.json new file mode 100644 index 000000000..65699b417 --- /dev/null +++ b/.backportrc.json @@ -0,0 +1,5 @@ +{ + "repoOwner": "Neo4j", + "repoName": "docs-operations", + "prTitle": "[Cherry-pick][{{targetBranch}}] {{commitMessages}}" + } \ No newline at end of file diff --git a/.github/workflows/auto-backport.yml b/.github/workflows/auto-backport.yml new file mode 100644 index 000000000..38cfa6ae9 --- /dev/null +++ b/.github/workflows/auto-backport.yml @@ -0,0 +1,31 @@ +name: auto-cherry-pick +on: + pull_request_target: + types: ["closed"] + +jobs: + backport: + name: Cherry-pick PR + runs-on: [ubuntu-latest] + if: | + github.event.pull_request.merged == true + && contains(github.event.pull_request.labels.*.name, 'auto-cherry-pick') + && github.event.action == 'closed' + ) + steps: + - name: Cherry-pick action + uses: sorenlouv/backport-github-action@929f69d04adbc196d982e60f02837b6cc00b3129 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + auto_backport_label_prefix: auto-cherry-pick-to- + add_original_reviewers: false + + - name: Info log + if: ${{ success() }} + run: cat ~/.backport/backport.info.log + + - name: Debug log + if: ${{ failure() }} + run: cat ~/.backport/backport.debug.log + + \ No newline at end of file