-
Notifications
You must be signed in to change notification settings - Fork 43
Remove top-level safe-jobs support, enforce safe-outputs.jobs #12439
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
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…e-jobs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove all support for top level safe-jobs and backward compatibility. |
Done in commit 985ff29. Changes made:
Top-level |
| detectionLog.Printf("No 'on' field detected - treating as shared agentic workflow") | ||
|
|
||
| // Reject top-level "safe-jobs" field (only safe-outputs.jobs is supported) | ||
| if err := c.validateNoTopLevelSafeJobs(frontmatterForValidation, cleanPath); err != nil { |
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.
@copilot remove check and remove function
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.
Removed in commit feacfe2. The check and function have been deleted - schema validation already catches "safe-jobs" as an unknown property.
| } | ||
|
|
||
| // Reject top-level "safe-jobs" field before schema validation (provides better error message) | ||
| if err := c.validateNoTopLevelSafeJobs(frontmatterForValidation, cleanPath); err != nil { |
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.
@copilot remove
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.
Removed in commit feacfe2.
|
|
||
| // validateNoTopLevelSafeJobs validates that the frontmatter does not contain a top-level "safe-jobs" field. | ||
| // Only safe-outputs.jobs is supported. | ||
| func (c *Compiler) validateNoTopLevelSafeJobs(frontmatter map[string]any, filePath string) error { |
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.
@copiliot remove function
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.
Removed in commit feacfe2. The validateNoTopLevelSafeJobs function has been deleted along with its test file.
…ches it Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Top-level
safe-jobsis no longer supported. Onlysafe-outputs.jobsis valid.Changes
parseSafeJobsConfig()to operate directly on jobs map, removing internal wrapper patternsafe-jobsis rejected by JSON schema as an unknown propertyExample
Previously tolerated (now rejected):
Required syntax:
Error when using deprecated syntax:
The JSON schema validation is sufficient to catch and reject the unsupported top-level
safe-jobsfield.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.