-
Notifications
You must be signed in to change notification settings - Fork 315
Description
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=0from 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_DATEcomes from thepublished_atfield 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
- .github/aw/github-agentic-workflows.md
- .github/workflows/instructions-janitor.lock.yml
- .github/workflows/instructions-janitor.md
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
- expires on Apr 1, 2026, 11:39 AM UTC