fix(ci): sync issue templates directly in script-submission.yml - #69
Merged
Conversation
The push job in validate-issue-templates.yml was supposed to self-heal bot-created branches, but script-submission.yml's branch-creating push uses the default GITHUB_TOKEN, and GitHub Actions suppresses new workflow- triggering events (including push) for GITHUB_TOKEN-authored pushes — the same rule that prevents the sync job's own corrective commits from causing an infinite loop also silently prevented it from ever running in the first place for these branches. Confirmed against two real submissions (#67, #68): both landed with a permanently-failing check and no auto-fix. Rather than fight the retrigger suppression, run the sync script directly in script-submission.yml before committing, so the schema/templates are already correct in the very first commit of every bot-generated PR. The push job in validate-issue-templates.yml remains as a backstop for genuine human-authored pushes (e.g. direct-edit PRs), which aren't subject to this suppression. Also fixes a stale error-comment string referencing the category enum check that was removed in #65. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validate-issue-templates.yml'spush-triggeredsyncjob was designed to self-heal bot-created branches automatically, but that never actually happened:script-submission.ymlcreates its branches viagit push origin "$BRANCH"using the defaultGITHUB_TOKEN, and GitHub Actions suppresses new workflow-triggering events (includingpush) forGITHUB_TOKEN-authored pushes. That's the same rule that (correctly) preventssync's own corrective commits from re-triggering itself — I just didn't realize it also silently killed the trigger the whole mechanism depended on for the bot-created case.Confirmed against two real submissions merged after #65 landed: PR #67 and #68 both introduced new tags and landed with a permanently-failing
checkand zeropush-event workflow runs on their branch — no auto-fix ever ran.Fix
Run
uv run tools/sync_issue_template_options.py --writedirectly inscript-submission.yml, right before the commit step, and include the resulting files (scripts.schema.json, both templates) in that same commit. The schema/templates are now correct from the very first commit of every bot-generated PR, socheckpasses immediately — no reliance on retriggering at all.The
push/syncjob invalidate-issue-templates.ymlis unchanged and still useful as a backstop for genuine human-authored pushes (e.g. a maintainer hand-editingscripts.jsondirectly), which aren't subject to this suppression.Also fixes a stale line in the failure-comment text that still referenced the category-enum rejection removed in #65.
Test plan
issue_to_scripts.pyinsert with a new tag →sync_issue_template_options.py --write→ confirmed the new tag lands in bothscripts.schema.jsonand the template in the same passuv run tools/test_sync_issue_template_options.py— 10 tests passuv run tools/sync_issue_template_options.py --checkonmain— in sync🤖 Generated with Claude Code