Add workflow to cancel Claude PR review after merge (#2609)
## Summary
- Adds a new GitHub Actions workflow that cancels in-progress/queued
`claude-pr-review.yml` runs when a PR is merged
- Mirrors the existing `cancel-ci-after-merge.yml` pattern, targeting
the Claude PR review workflow instead of CI
- Avoids wasting CI minutes on reviews for already-merged PRs
## Test plan
- Verify the workflow file is valid YAML and matches the structure of
`cancel-ci-after-merge.yml`
- Merge a PR that has a running Claude PR review and confirm the review
workflow is cancelled
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2609"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: adds an isolated GitHub Actions workflow that only cancels
in-progress/queued runs for a specific workflow on PR merge, with no
application code or data changes.
>
> **Overview**
> Adds a new `cancel-claude-pr-review-after-merge.yml` workflow that
triggers when a PR is *closed and merged* and cancels any
in-progress/queued `claude-pr-review.yml` runs associated with the PR’s
head SHA.
>
> The job queries multiple run statuses, deduplicates results, and
issues `cancelWorkflowRun` calls with `actions: write` permission to
avoid wasting runner time on already-merged PR reviews.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9faccb5308bd575e3ef638c6efb94818dc9964b4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds a GitHub Actions workflow that cancels Claude PR review runs after
a PR is merged to save CI minutes. Mirrors the existing
cancel-ci-after-merge workflow but targets claude-pr-review.yml.
- **New Features**
- New workflow triggers on merged PRs and cancels claude-pr-review.yml
runs for the PR’s head SHA (in_progress/queued/pending/waiting) using
file-path matching and dedup, including for forks.
<sup>Written for commit 9faccb5308bd575e3ef638c6efb94818dc9964b4.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
Co-authored-by:
Claude Opus 4.6 <noreply@anthropic.com>
正在显示
请
注册
或者
登录
后发表评论