-
Notifications
You must be signed in to change notification settings - Fork 263
fix(schema): add allowed-repos to remove-labels and assign-to-user schema
#18132
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,10 +171,6 @@ | |
| "checks": { | ||
| "$ref": "#/definitions/permissions-level" | ||
| }, | ||
|
Comment on lines
171
to
173
|
||
| "copilot-requests": { | ||
| "type": "string", | ||
| "enum": ["write", "none"] | ||
| }, | ||
| "contents": { | ||
| "$ref": "#/definitions/permissions-level" | ||
| }, | ||
|
|
||
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 schema changes correctly add
allowed-reposto the JSON schema, which will allow the YAML to compile and the field will be parsed into the Go structs via the embeddedSafeOutputTargetConfig. However, the runtime configuration generation inpkg/workflow/safe_outputs_config_generation.godoes not emit these fields to the handler configuration inconfig.json/GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG.Specifically, lines 285-289 use
generateMaxWithAllowedConfigforremove_labels, which only includesmaxandallowedfields. This means the following fields fromSafeOutputTargetConfigwill be missing from the runtime config:target(already in schema)target-repo(already in schema)allowed-repos(newly added in this PR)Additionally, the
blockedfield (also in the Go struct and schema) is not being emitted.For
remove_labelsto work correctly with all its schema-defined fields, the config generation should be updated to usegenerateTargetConfigWithReposlikeadd_labelsdoes (lines 272-282). The same pattern should includeblockedinadditionalFields.Without this fix,
allowed-reposwill compile without errors but won't be included in the runtime configuration, rendering the feature non-functional.This issue also appears on line 5839 of the same file.