Skip to content

Add canvas extension PR labeling and validation workflow#2017

Merged
aaronpowell merged 1 commit into
stagedfrom
aaronpowell/canvas-extension-validation
Jun 16, 2026
Merged

Add canvas extension PR labeling and validation workflow#2017
aaronpowell merged 1 commit into
stagedfrom
aaronpowell/canvas-extension-validation

Conversation

@aaronpowell

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the staged branch for this pull request.

Description

This adds baseline guardrails for canvas extension submissions so reviewers get consistent structure and preview assets, and so canvas PRs can be identified automatically.

The change updates the PR template to include canvas extensions as a contribution type, extends PR intent labeling with a new canvas-extension label for extensions/** changes, and adds a dedicated validation workflow for extension submissions. The new workflow checks each changed extension directory for extension.mjs and assets/preview.png (the screenshot convention introduced in #1987), then fails with actionable review guidance when requirements are missing.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify): New GitHub Actions workflow under .github/workflows.

Additional Notes

Validation intentionally skips extensions/external-assets because it is not a canvas extension directory.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

- Update PR template to include canvas extension as a contribution type
- Add 'canvas-extension' label (color: E4B9FF) to label-pr-intent workflow
  with auto-detection for PRs touching extensions/**
- Add new validate-canvas-extensions.yml workflow that checks:
  - extension.mjs is present in each changed extension folder
  - assets/preview.png screenshot is present in each changed extension folder
  - Posts a REQUEST_CHANGES review with a fix guide on failure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 23:33
@github-actions github-actions Bot added new-submission PR adds at least one new contribution workflow PR touches workflow automation labels Jun 16, 2026

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 guardrails for canvas extension submissions by introducing automated validation and PR intent labeling updates, plus a small PR template refresh to reflect canvas extensions as a contribution type.

Changes:

  • Introduces a new GitHub Actions workflow to validate required canvas extension files (extension.mjs, assets/preview.png) for PRs touching extensions/**.
  • Extends PR intent auto-labeling to apply a new canvas-extension label when files under extensions/<name>/... change.
  • Updates the PR template checklist and contribution-type options to include canvas extensions.
Show a summary per file
File Description
.github/workflows/validate-canvas-extensions.yml New PR-time validator for required canvas extension structure and preview asset.
.github/workflows/label-pr-intent.yml Adds canvas-extension managed label and detection patterns for extensions/ changes.
.github/pull_request_template.md Expands checklist/type options to include canvas extensions.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment on lines +42 to +46
if (parts[0] === EXTENSIONS_DIR && parts.length >= 2) {
const extName = parts[1];
// Skip the external-assets directory — it's not a canvas extension
if (extName !== EXTERNAL_ASSETS_DIR) {
changedExtDirs.add(path.join(EXTENSIONS_DIR, extName));
Comment on lines +67 to +68
const extName = path.basename(extDir);

Comment on lines +118 to +122
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
event: 'REQUEST_CHANGES',
@aaronpowell aaronpowell merged commit 5fb37f6 into staged Jun 16, 2026
12 checks passed
@aaronpowell aaronpowell deleted the aaronpowell/canvas-extension-validation branch June 16, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-submission PR adds at least one new contribution workflow PR touches workflow automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants