Skip to content

Fix schema/validation mismatch: add "public" to repos enum in guard-policies#20281

Merged
lpcox merged 2 commits intomainfrom
copilot/update-gh-aw-workflow-schema
Mar 10, 2026
Merged

Fix schema/validation mismatch: add "public" to repos enum in guard-policies#20281
lpcox merged 2 commits intomainfrom
copilot/update-gh-aw-workflow-schema

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

The repos field in tools.github guard-policies accepted "public" at validation time but the JSON schema only enumerated "all", causing a schema validation error at compile time when users wrote repos: public.

Changes

  • pkg/parser/schemas/main_workflow_schema.json: Expanded repos string enum from ["all"] to ["all", "public"]; updated array items description to reflect wildcard pattern support (owner/*, owner/prefix*)

Example

Previously failing frontmatter that now compiles correctly:

tools:
  github:
    repos: public
    min-integrity: none

Renders in the MCP gateway config as expected:

"guard-policies": {
  "allow-only": {
    "min-integrity": "none",
    "repos": "public"
  }
}

Copilot AI and others added 2 commits March 9, 2026 23:23
…CP server

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@lpcox lpcox marked this pull request as ready for review March 10, 2026 00:14
Copilot AI review requested due to automatic review settings March 10, 2026 00:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Aligns the workflow JSON schema with existing guard-policy validation by allowing tools.github.repos: public, eliminating schema validation failures for an already-supported configuration.

Changes:

  • Expanded tools.github.repos schema string enum to include "public" alongside "all".
  • Updated schema descriptions to document repository pattern support (owner/repo, owner/*, owner/prefix*).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lpcox lpcox merged commit f5aa6a7 into main Mar 10, 2026
41 of 42 checks passed
@lpcox lpcox deleted the copilot/update-gh-aw-workflow-schema branch March 10, 2026 00:27
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.

3 participants