From 45d5013dd20f4d8c602ff83b48d7c4280187be7a Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 23 Oct 2026 16:45:31 -0700 Subject: [PATCH] agents: comment superseding PR when closing duplicate Dependabot PRs Closing duplicate or superseded Dependabot PRs without explanation leaves no record of which PR replaced them. Update the Dependabot PR processing workflow to close superseded PRs with a comment referencing the superseding PR number. --- .agents/skills/process-dependabot-prs/SKILL.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.agents/skills/process-dependabot-prs/SKILL.md b/.agents/skills/process-dependabot-prs/SKILL.md index c0af0b6b18..0c51cb5ed4 100644 --- a/.agents/skills/process-dependabot-prs/SKILL.md +++ b/.agents/skills/process-dependabot-prs/SKILL.md @@ -82,13 +82,20 @@ Classify each PR as **OK**, **OK (with trivial fixes)**, or **Problematic**: Once the user confirms: -1. **Handle Conflicts or Stale Branches**: +1. **Close Duplicate or Superseded PRs**: + - When closing/skipping a duplicate or superseded PR, close it and post a + comment noting which PR supersedes it: + ```bash + gh pr close --repo bazel-contrib/rules_python \ + --comment "Superseded by #." + ``` +2. **Handle Conflicts or Stale Branches**: - If a pure Dependabot PR has merge conflicts after another PR merges, run: ```bash gh pr comment --repo bazel-contrib/rules_python \ --body "@dependabot recreate" ``` -2. **Fix Trivial Failures (When Needed)**: +3. **Fix Trivial Failures (When Needed)**: - Fetch and check out the PR branch: ```bash git fetch upstream @@ -115,11 +122,11 @@ Once the user confirms: ```bash git push upstream HEAD: ``` -3. **Approve the PR**: +4. **Approve the PR**: ```bash gh pr review --repo bazel-contrib/rules_python --approve ``` -4. **Merge Using `merge-pr`**: +5. **Merge Using `merge-pr`**: - Follow [merge-pr](../merge-pr/SKILL.md) to enqueue the PR (`gh pr merge --repo bazel-contrib/rules_python --auto --squash`) and launch a `Merge PR Shepherd` subagent to monitor CI, retry flakes, and track the