From 19715bf313680509c2ef5bcc7af7b304a000a199 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 19 Jun 2024 11:22:55 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A5=20Exterminate=20legacy=20`back?= =?UTF-8?q?port`=20GHA=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, this workflow was being used to cherry-pick PRs made against `main` into older stable branches. Now that #12475 integrated the Patchback GitHub App, it's no longer needed as it's making duplicate pull requests which don't even trigger CI runs automatically due to #10354. So this patch removes said workflow to address the problem. --- .github/workflows/backport.yml | 51 ---------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 38ce7260278..00000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: backport - -on: - # Note that `pull_request_target` has security implications: - # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - # In particular: - # - Only allow triggers that can be used only be trusted users - # - Don't execute any code from the target branch - # - Don't use cache - pull_request_target: - types: [labeled] - -# Set permissions at the job level. -permissions: {} - -jobs: - backport: - if: startsWith(github.event.label.name, 'backport ') && github.event.pull_request.merged - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: true - - - name: Create backport PR - run: | - set -eux - - git config --global user.name "pytest bot" - git config --global user.email "pytestbot@gmail.com" - - label='${{ github.event.label.name }}' - target_branch="${label#backport }" - backport_branch=backport-${{ github.event.number }}-to-"${target_branch}" - subject="[$target_branch] $(gh pr view --json title -q .title ${{ github.event.number }})" - - git checkout origin/"${target_branch}" -b "${backport_branch}" - git cherry-pick -x --mainline 1 ${{ github.event.pull_request.merge_commit_sha }} - git commit --amend --message "$subject" - git push --set-upstream origin --force-with-lease "${backport_branch}" - gh pr create \ - --base "${target_branch}" \ - --title "${subject}" \ - --body "Backport of PR #${{ github.event.number }} to $target_branch branch. PR created by backport workflow." - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bab3c2c291464f38ddd12d15818e41d2a9bb5e25 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 19 Jun 2024 11:31:55 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20myself=20to=20the=20au?= =?UTF-8?q?thors=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 80b6d5157cd..347efad57b3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -392,6 +392,7 @@ Stefano Taschini Steffen Allner Stephan Obermann Sven-Hendrik Haase +Sviatoslav Sydorenko Sylvain Marié Tadek Teleżyński Takafumi Arakaki