From d16124c32c833cabc3f6e0620b5c0dd956727108 Mon Sep 17 00:00:00 2001 From: "devnull.exile" Date: Fri, 6 Nov 2026 16:01:50 +0800 Subject: [PATCH] ci: review a pull request again when it is retargeted Retargeting a stacked pull request is an edited event that changes the reviewed diff without a new commit, so an earlier bot approval would otherwise stay. Title and body edits use their own concurrency group, so they start no review and never cancel one. --- .github/workflows/deepseek-review.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deepseek-review.yml b/.github/workflows/deepseek-review.yml index 5b6b18b..9d3608b 100644 --- a/.github/workflows/deepseek-review.yml +++ b/.github/workflows/deepseek-review.yml @@ -1,20 +1,23 @@ name: DeepSeek PR Review on: + # Retargeting a stacked PR is an "edited" event that changes the reviewed diff + # without a new commit, so it is reviewed again; other edits start no review. pull_request_target: - types: [opened, reopened, ready_for_review, synchronize] + types: [opened, reopened, ready_for_review, synchronize, edited] # The action works with the reviewer GitHub App token only. permissions: {} concurrency: - group: deepseek-review-${{ github.event.pull_request.number }} + # A title or body edit gets its own group, so it never cancels a running review. + group: deepseek-review-${{ github.event.pull_request.number }}${{ github.event.action == 'edited' && !github.event.changes.base && '-edit' || '' }} cancel-in-progress: true jobs: review: # Forks of this repository have no reviewer secrets. - if: github.repository_owner == 'LHCWN' + if: github.repository_owner == 'LHCWN' && (github.event.action != 'edited' || github.event.changes.base) runs-on: ubuntu-latest timeout-minutes: 30 steps: