Add canvas-specific intake validation for external plugins#2319
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0f03fd92-3bfa-4c67-a709-177fbd46c40e
Contributor
There was a problem hiding this comment.
Pull request overview
Adds canvas-specific validation and labeling to external plugin intake.
Changes:
- Validates canvas manifests and preview assets at immutable locators.
- Adds and preserves the
external-plugin-canvaslabel. - Updates submission guidance for canvas plugins.
Show a summary per file
| File | Description |
|---|---|
eng/external-plugin-intake.mjs |
Detects and validates canvas submissions. |
eng/external-plugin-intake-state.mjs |
Applies the canvas label during intake transitions. |
.github/workflows/setup-labels.yml |
Creates the canvas label. |
.github/workflows/external-plugin-command-router.yml |
Preserves the label during manual override. |
.github/ISSUE_TEMPLATE/external-plugin.yml |
Documents canvas submission requirements. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Medium
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+414
to
+417
| if (response.kind === "apiError") { | ||
| sawManifestApiError = true; | ||
| continue; | ||
| } |
Comment on lines
+59
to
+63
| const EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS = Object.freeze([ | ||
| ".github/plugin/plugin.json", | ||
| ".plugin/plugin.json", | ||
| "plugin.json", | ||
| ]); |
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.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
This updates the external plugin intake flow so canvas-specific validation runs only when a submission declares the
canvaskeyword, while keeping normal external plugin submissions unchanged.For canvas submissions, intake now verifies
logo: "assets/preview.png"and checks that both the plugin manifest and preview image can be resolved from the submitted immutable release locator (source.shaorsource.ref). Intake evaluation now also emits anisCanvasPluginflag and automatically applies a dedicatedexternal-plugin-canvaslabel. The setup-labels workflow and command-router override path were updated so this label is created and preserved during manual state transitions.The issue template now instructs submitters to include the
canvaskeyword when appropriate and clarifies that canvas asset validation is tied to the submitted immutable sha/ref.Type of Contribution
Additional Notes
Validation run:
npm run plugin:validate.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.