From cebb302730e1b74ed031e7e4ba120f0d687dea5a Mon Sep 17 00:00:00 2001 From: Yiya Chen Date: Thu, 3 Jul 2025 14:00:31 +0800 Subject: [PATCH] ci: use pull_request_target (#370) Signed-off-by: Yi-Ya Chen --- .github/workflows/backport-request.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport-request.yaml b/.github/workflows/backport-request.yaml index a74a5ea0..be94274d 100644 --- a/.github/workflows/backport-request.yaml +++ b/.github/workflows/backport-request.yaml @@ -1,7 +1,7 @@ name: "[PR Management] Request Backport via Mergify" on: - pull_request: + pull_request_target: types: [closed] branches: [main] @@ -13,6 +13,11 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.base_ref }} + - name: Post Mergify backport command env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}