Automated PR creation for templates updates.#423
Open
Kaniska244 wants to merge 1 commit into
Open
Conversation
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
Adds an automated workflow that detects when the image variants referenced by templates in this repo have drifted from the tags actually published by devcontainers/images, opens (or refreshes) a single tracking issue with the comparison report, and assigns it to the GitHub Copilot coding agent to prepare the fix. Also adds an
AGENTS.mdguide so AI agents know exactly how to bring templates back in sync.Motivation
When devcontainers/images adds or removes an image variant, the matching template's
options.imageVariant.proposalscan silently fall out of date. This PR turns that drift into an actionable, auto-assigned tracking issue so it gets picked up and fixed promptly instead of being missed.Changes
.github/workflows/check-image-tags.yamlreport-drift-issuejob. Runs only onschedule/workflow_dispatch(never on PRs/pushes), checks out the last released tag ofdevcontainers/images, runsbuild/check-image-tags.ts, strips ANSI colour codes, detectsMISSING/UNUSEDdrift, and on drift runsbuild/report-drift-issue.sh. Usessecrets.PAT(notGITHUB_TOKEN) so the Copilot coding agent is reliably triggered by the assignment; requiresissues: write.build/report-drift-issue.shautomated-image-synclabel exists, creates or refreshes a single open tracking issue, and assigns it to the Copilot coding agent (copilot-swe-agent) via GraphQL. Warns and exits gracefully if the agent isn't assignable.AGENTS.mdproposals/defaultwith devcontainers/images (ordering conventions, version bumping, validation)..gitignore/images/clone used bybuild/check-image-tags.ts; also add the missing trailing newline.How it works
MISSING(referenced but no longer published) or genuinely newUNUSEDvariants exist, a tracking issue titled “Sync template image variants with devcontainers/images” is created or refreshed.AGENTS.mdto update the affected templates, bump each edited template'sversion, and validate until there are no MISSING tags.Requirements / Notes
PATsecret withissues: read and writemust be configured, and the Copilot coding agent must be enabled for the repository so it appears as an assignable actor. If it isn't assignable, the issue is created but left unassigned with a warning.Testing
report-drift-issuecan be exercised manually via workflow_dispatch.npx tsx build/check-image-tags.ts ../imagesto reproduce the report the workflow consumes.