-
Notifications
You must be signed in to change notification settings - Fork 135
Add test coverage for workflow_dispatch input type enum validation #15047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds missing schema validation test coverage for workflow_dispatch input type enums, ensuring invalid types are rejected at compile time with clear errors. Also includes a couple of documentation updates related to rate limiting defaults and an agent schedule entry.
Changes:
- Add table-driven tests covering all supported
workflow_dispatch.inputs.*.typevalues and several common invalid values. - Update frontmatter reference docs to explicitly document the default
rate-limit.ignored-rolesbehavior. - Update the agent factory status table to reflect the current weekly cron schedule for Layout Specification Maintainer.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/parser/schema_test.go | Adds schema validation tests for workflow_dispatch input type enum acceptance/rejection. |
| docs/src/content/docs/reference/frontmatter-full.md | Documents the default for rate-limit.ignored-roles when omitted. |
| docs/src/content/docs/agent-factory-status.mdx | Updates documented cron schedule for Layout Specification Maintainer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| wantErr: true, | ||
| errContains: "value must be one of 'string', 'choice', 'boolean', 'number', 'environment'", | ||
| }, |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same errContains string is duplicated across multiple new invalid-type test cases, which makes the tests harder to update if the enum wording changes. Consider factoring this into a shared constant/variable (or generating the cases in a small loop) to avoid repeating the exact message in several places.
| # Optional list of roles that are exempt from rate limiting. Defaults to ['admin', | ||
| # 'maintain', 'write'] if not specified. Users with any of these roles will not be | ||
| # subject to rate limiting checks. To apply rate limiting to all users, set to an | ||
| # empty array: [] |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation change (rate-limit ignored-roles default behavior) isn’t mentioned in the PR title/description, which currently frames the change as test-only. Please either update the PR description to include this doc update, or split it into a separate PR so the scope is clear.
| | [Issue Triage Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/issue-triage-agent.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/issue-triage-agent.lock.yml) | - | - | | ||
| | [jsweep - JavaScript Unbloater](https://github.com/github/gh-aw/blob/main/.github/workflows/jsweep.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/jsweep.lock.yml) | - | - | | ||
| | [Layout Specification Maintainer](https://github.com/github/gh-aw/blob/main/.github/workflows/layout-spec-maintainer.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/layout-spec-maintainer.lock.yml) | `0 7 * * 1-5` | - | | ||
| | [Layout Specification Maintainer](https://github.com/github/gh-aw/blob/main/.github/workflows/layout-spec-maintainer.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/layout-spec-maintainer.lock.yml) | `0 7 * * 1` | - | |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change updates the documented schedule for Layout Specification Maintainer, but the PR title/description don’t mention any agent-factory-status doc updates. Please either document this in the PR description or move it to a separate PR to keep the change set focused.
The schema already validates workflow_dispatch input types against the enum
[string, choice, boolean, number, environment], but test coverage was missing.Changes
pkg/parser/schema_test.go:Example
{ name: "invalid: workflow_dispatch with invalid input type 'text'", frontmatter: map[string]any{ "on": map[string]any{ "workflow_dispatch": map[string]any{ "inputs": map[string]any{ "test_input": map[string]any{ "description": "Test input", "type": "text", // invalid - should be "string" }, }, }, }, }, wantErr: true, errContains: "value must be one of 'string', 'choice', 'boolean', 'number', 'environment'", },This ensures the validation continues to catch invalid types at compile time with clear error messages.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.