Skip to content

Add release-cutter canvas extension#454

Open
bdehamer wants to merge 2 commits into
mainfrom
bdehamer/release-cutter-canvas
Open

Add release-cutter canvas extension#454
bdehamer wants to merge 2 commits into
mainfrom
bdehamer/release-cutter-canvas

Conversation

@bdehamer

@bdehamer bdehamer commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

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.

image

What it does

  1. Version — shows the latest release and the floating major tag to move; patch/minor/major bump buttons prefill the next v-prefixed semver tag, with validation.
  2. Release notes — pulls GitHub's auto-generated notes for the commit range into a checklist. Dependabot dev-dependency and GitHub Actions bumps are pre-unchecked; human changes and prod-dependency bumps stay checked. Supports select/clear all and raw-markdown editing.
  3. Publish — creates the GitHub Release (never a draft, never with assets), then force-moves the major tag (e.g. v4) to the new release commit via the refs API.

Files

  • extension.mjs — canvas wiring + per-instance loopback HTTP server
  • backend.mjsgh/git logic, version math, dependabot classification
  • renderer.mjs — iframe UI using app theme tokens

Also 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 destructive publish_release path was not exercised (would create a real release); the create + tag-move logic is wired and ready.

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
Copilot AI review requested due to automatic review settings July 17, 2026 16:46
@bdehamer
bdehamer requested a review from a team as a code owner July 17, 2026 16:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) using gh + git for 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

Comment thread .github/extensions/release-cutter/renderer.mjs Outdated
Comment thread .github/extensions/release-cutter/renderer.mjs Outdated
Comment thread .github/extensions/release-cutter/renderer.mjs Outdated
Comment thread .github/extensions/release-cutter/renderer.mjs Outdated
Comment thread .github/extensions/release-cutter/extension.mjs
Comment thread .github/extensions/release-cutter/extension.mjs
Comment thread .github/extensions/release-cutter/extension.mjs
Comment thread .github/extensions/release-cutter/backend.mjs
Comment thread .github/extensions/release-cutter/backend.mjs Outdated
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants