Add release-cutter canvas extension#454
Open
bdehamer wants to merge 2 commits into
Open
Conversation
Adds a Copilot canvas that guides cutting a new release of the action: - Picks the next v-prefixed semver tag (patch/minor/major bump). - Generates release notes from commits since the last release, with dependabot dev-dependency and GitHub Actions bumps pre-excluded. - Curates notes via checklist or raw-markdown editing. - Publishes the GitHub Release (never a draft, no assets), then force-moves the floating major tag (e.g. v4) to the release commit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb724771-e05f-4f6a-82c9-f395439dcd12
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Copilot CLI Canvas extension under .github/extensions/release-cutter/ to guide maintainers through cutting and publishing a release that matches this repo’s conventions (semver tag selection, curated auto-notes, published release with no assets, and floating major tag movement).
Changes:
- Introduces a canvas extension entrypoint (
extension.mjs) that hosts an iframe UI via a per-canvas loopback HTTP server and exposes agent-callable actions (get_status,generate_notes,publish_release). - Implements backend release logic (
backend.mjs) usinggh+gitfor status, generated notes parsing/classification, release creation, and major-tag force-move. - Adds an iframe renderer (
renderer.mjs) implementing version selection, notes checklist/raw editor, and publish flow.
Show a summary per file
| File | Description |
|---|---|
| .github/extensions/release-cutter/extension.mjs | Canvas wiring, loopback server routing, and agent action handlers. |
| .github/extensions/release-cutter/backend.mjs | gh/git implementation for status, release notes generation/parsing, and publishing + tag move. |
| .github/extensions/release-cutter/renderer.mjs | Iframe HTML/JS UI for selecting version, curating notes, and publishing. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 9
- Review effort level: Low
- Gate /api/* endpoints behind a random per-instance token embedded in the iframe URL, so only the canvas can trigger a publish. - Return HTTP 5xx (not 200) when a request handler throws. - Harden readJsonBody: guard against multiple settle and destroy the request on overflow. - Build banners/subtitle from DOM nodes (textContent) instead of innerHTML to avoid HTML injection from gh/CLI output; add rel=noopener on the release link. - Validate the tag in generateNotes and use a commits-page footer fallback when there is no previous release. - Remove a malformed hint element with an invalid id. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb724771-e05f-4f6a-82c9-f395439dcd12
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 a Copilot CLI canvas extension (
.github/extensions/release-cutter/) that guides cutting a new release of the action, encoding this repo's release conventions.What it does
v-prefixed semver tag, with validation.v4) to the new release commit via the refs API.Files
extension.mjs— canvas wiring + per-instance loopback HTTP serverbackend.mjs—gh/gitlogic, version math, dependabot classificationrenderer.mjs— iframe UI using app theme tokensAlso exposes three agent-callable actions (
get_status,generate_notes,publish_release) so the release can be driven conversationally.Testing
Discovery, open,
get_status,generate_notes, input-validation rejection, and reserved-verb rejection all verified against the live repo. The destructivepublish_releasepath was not exercised (would create a real release); the create + tag-move logic is wired and ready.