From c4999dd2061a318e51e7e764355333a705fd4967 Mon Sep 17 00:00:00 2001 From: Pierre Delpy Date: Tue, 27 Aug 2024 09:08:04 +0200 Subject: [PATCH] feat: automatically create pullrequests upon main changes --- .github/workflows/backport.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..a61864a3 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,33 @@ +name: Backport to Feature Branch + +on: + pull_request: + types: [closed] + branches: + - main + +jobs: + backport: + name: Backport PR + if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport')) + 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-feature/pilot-projects + branches: 'feature/pilot-projects' + #branches: 'feature/pilot-projects, another-branch' + title: 'Automated Backport from main' + labels: 'backport' + body: 'This PR automatically backports changes from the main branch to this feature branch after a PR was merged into main.' + reviewers : 'PierreDelpy' + + - 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