Skip to content

[q] fix(instructions-janitor): use GitHub MCP get_latest_release instead of git describe #23537

@github-actions

Description

@github-actions

Problem

The instructions-janitor workflow uses git describe --tags --abbrev=0 to determine the latest release version. This fails in shallow clones (the default for GitHub Actions checkouts) because no tags are fetched — the command returns nothing, causing the agent to fall back to an incorrect version (e.g., v0.40.1 instead of v0.64.4).

Fix

  • Removed git describe --tags --abbrev=0 from the allowed bash commands
  • Updated Step 1 of the workflow prompt to use get_latest_release(owner="github", repo="gh-aw") from the GitHub MCP server, which is always accurate regardless of git state
  • Updated Step 2 to clarify that RELEASE_DATE comes from the published_at field of the release API response

Validation

Workflow compiled successfully ✅

Fixes #23533 (comment by @pelikhan: "fix latest release fetch strategy. It should be v0.64.4 now")


Warning

Protected Files — Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.

Protected files

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.

Create the pull request manually
# Download the patch from the workflow run
gh run download 23742626305 -n agent -D /tmp/agent-23742626305

# Create a new branch
git checkout -b fix/instructions-janitor-release-fetch-ece7a24c46d2ddb2 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-23742626305/aw-fix-instructions-janitor-release-fetch.patch

# Push the branch and create the pull request
git push origin fix/instructions-janitor-release-fetch-ece7a24c46d2ddb2
gh pr create --title '[q] fix(instructions-janitor): use GitHub MCP get_latest_release instead of git describe' --base main --head fix/instructions-janitor-release-fetch-ece7a24c46d2ddb2 --repo github/gh-aw

🎩 Equipped by Q ·

  • expires on Apr 1, 2026, 11:39 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions