-
Notifications
You must be signed in to change notification settings - Fork 347
feat(safe-outputs): add allowed-events filter to submit-pull-request-review
#25484
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 |
|---|---|---|
|
|
@@ -461,6 +461,7 @@ var handlerRegistry = map[string]handlerBuilder{ | |
| AddIfNotEmpty("target", c.Target). | ||
| AddIfNotEmpty("target-repo", c.TargetRepoSlug). | ||
| AddStringSlice("allowed_repos", c.AllowedRepos). | ||
| AddStringSlice("allowed_events", c.AllowedEvents). | ||
| AddIfNotEmpty("github-token", c.GitHubToken). | ||
| AddStringPtr("footer", getEffectiveFooterString(c.Footer, cfg.Footer)). | ||
|
Comment on lines
461
to
466
|
||
| AddIfTrue("staged", c.Staged). | ||
|
|
||
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 add constraint for minimum 1
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.
Added
minItems: 1to theallowed-eventsschema in commit5b475a7. Also addressed the security reviewer's fail-closed feedback in the same commit: the parser now returnsnilifallowed-eventsis present but not a list, or if all provided values are invalid (rather than silently falling back to allowing all events).