diff --git a/.github/workflows/cherry-pick-to-stable.yml b/.github/workflows/cherry-pick-to-stable.yml index f59a3ed4a..485f20e7b 100644 --- a/.github/workflows/cherry-pick-to-stable.yml +++ b/.github/workflows/cherry-pick-to-stable.yml @@ -28,6 +28,10 @@ jobs: with: # Use the dynamically generated GitHub App token token: ${{ steps.generate-token.outputs.token }} + # Explicitly check out the base branch (the PR is already merged into it). + # Avoids the default `refs/pull//merge` ref, which actions/checkout + # refuses to check out for fork PRs on pull_request_target events. + ref: ${{ github.event.pull_request.base.ref }} fetch-depth: 0 - name: Configure Git Author