-
Notifications
You must be signed in to change notification settings - Fork 241
Add optional discussions field to control discussions:write permission for add-comment and hide-comment #16509
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ type HideCommentConfig struct { | |
| BaseSafeOutputConfig `yaml:",inline"` | ||
| SafeOutputTargetConfig `yaml:",inline"` | ||
| AllowedReasons []string `yaml:"allowed-reasons,omitempty"` // List of allowed reasons for hiding comments (default: all reasons allowed) | ||
| Discussions *bool `yaml:"discussions,omitempty"` // When false, excludes discussions:write permission. Default (nil or true) includes discussions:write for GitHub Apps with Discussions permission. | ||
| } | ||
|
Comment on lines
13
to
15
|
||
|
|
||
| // parseHideCommentConfig handles hide-comment configuration | ||
|
|
||
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 standalone
add_commentjob now conditionally dropsdiscussions:writebased onsafe-outputs.add-comment.discussions, but there isn't test coverage asserting the generated job permissions for the default vsdiscussions:falsecases (existing tests forbuildCreateOutputAddCommentJobonly checkneeds/env). Add a unit test that verifies the job's rendered permissions include/excludediscussions: writeaccordingly.