Skip to content

feat(workflows): allow update-awf-version to close superseded PRs#590

Merged
jamesadevine merged 1 commit into
mainfrom
devinejames.ci-annoyances
May 17, 2026
Merged

feat(workflows): allow update-awf-version to close superseded PRs#590
jamesadevine merged 1 commit into
mainfrom
devinejames.ci-annoyances

Conversation

@jamesadevine
Copy link
Copy Markdown
Collaborator

Summary

Allows the update-awf-version agent to close its own superseded pull requests, while restricting closures to PRs that match the exact title pattern this workflow is allowed to open.

Why

The version-updater workflow opens a new PR every time AWF_VERSION, COPILOT_CLI_VERSION, MCPG_VERSION, or ecosystem_domains.json falls behind upstream. Because the PR title includes the version number, an older outdated PR cannot be detected by exact-title duplicate checking and accumulates until a maintainer closes it manually. The agent should be allowed to clean these up — but only its own PRs.

Approach

Restriction is enforced at two layers:

  1. Safe-output layer (gh-aw enforced). Added a title-prefix: "chore(deps): " to create-pull-request so every PR the workflow opens is namespaced. Added a new close-pull-request safe output with required-title-prefix: "chore(deps): ", target: "*", max: 10. gh-aw will reject any close request whose target PR title does not start with chore(deps): .

  2. Agent-instruction layer. Step 3 of the prompt now tells the agent to look for open PRs starting with the item-specific sub-prefix (e.g. chore(deps): update AWF_VERSION to ), keep any exact match for the latest version, and close older outdated ones via close-pull-request. Explicit guidance forbids crossing item boundaries — a stale MCPG_VERSION PR is not closable from the AWF_VERSION step, even though both share the broader chore(deps): namespace.

PR titles in the markdown body were updated to drop the redundant chore: (gh-aw auto-prepends chore(deps): ), producing clean conventional-commits titles like chore(deps): update AWF_VERSION to 0.24.0.

Files changed

  • .github/workflows/update-awf-version.md — added close-pull-request, added title-prefix on create-pull-request, rewrote step 3 and updated PR title templates
  • .github/workflows/update-awf-version.lock.yml — recompiled
  • .github/aw/actions-lock.json — incidental lockfile refresh from gh aw compile (gh-aw-actions/setup v0.71.5 → v0.72.1)

Verification

gh aw compile update-awf-version
✓ Compiled 1 workflow(s): 0 error(s), 0 warning(s)

Adds close-pull-request safe-output with required-title-prefix matching the title-prefix on create-pull-request so the agent can only close PRs it is allowed to open.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit e0ddc2c into main May 17, 2026
12 checks passed
@jamesadevine jamesadevine deleted the devinejames.ci-annoyances branch May 17, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant