From a905f4295eeb005a0473645aa7c9b6f23cdfb677 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 14 Jan 2022 20:19:51 -0500 Subject: [PATCH 1/2] Add the `Backport` GitHub Action workflow, which automatically backports PRs when you add the backport label --- .github/workflows/backport.yml | 15 +++++++++++++++ 1 file changed, 15 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..f4d1c268 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,15 @@ +name: Backport +on: + pull_request: + types: + - closed + - labeled +jobs: + backport: + runs-on: ubuntu-18.04 + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From c8bb0db2719a30e4b2102ea2f51408831d687b07 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 14 Jan 2022 20:21:00 -0500 Subject: [PATCH 2/2] Enable the `Backport` workflow for pull requests that were made from forks See https://github.com/tibdex/backport/pull/77 for details --- .github/workflows/backport.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index f4d1c268..850ecd76 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,6 +1,6 @@ name: Backport on: - pull_request: + pull_request_target: types: - closed - labeled @@ -8,6 +8,7 @@ jobs: backport: runs-on: ubuntu-18.04 name: Backport + if: github.event.pull_request.merged steps: - name: Backport uses: tibdex/backport@v1