-
Notifications
You must be signed in to change notification settings - Fork 135
Add boolean value support for safe-outputs.body configuration #15097
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,7 @@ type UpdateIssuesConfig struct { | |||||
| UpdateEntityConfig `yaml:",inline"` | ||||||
| Status *bool `yaml:"status,omitempty"` // Allow updating issue status (open/closed) - presence indicates field can be updated | ||||||
| Title *bool `yaml:"title,omitempty"` // Allow updating issue title - presence indicates field can be updated | ||||||
| Body *bool `yaml:"body,omitempty"` // Allow updating issue body - presence indicates field can be updated | ||||||
| Body *bool `yaml:"body,omitempty"` // Allow updating issue body - boolean value controls permission (defaults to true) | ||||||
| Footer *bool `yaml:"footer,omitempty"` // Controls whether AI-generated footer is added. When false, visible footer is omitted but XML markers are kept. | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -23,7 +23,7 @@ func (c *Compiler) parseUpdateIssuesConfig(outputMap map[string]any) *UpdateIssu | |||||
| return []UpdateEntityFieldSpec{ | ||||||
| {Name: "status", Mode: FieldParsingKeyExistence, Dest: &cfg.Status}, | ||||||
| {Name: "title", Mode: FieldParsingKeyExistence, Dest: &cfg.Title}, | ||||||
| {Name: "body", Mode: FieldParsingKeyExistence, Dest: &cfg.Body}, | ||||||
| {Name: "body", Mode: FieldParsingBoolValue, Dest: &cfg.Body}, | ||||||
|
||||||
| {Name: "body", Mode: FieldParsingBoolValue, Dest: &cfg.Body}, | |
| {Name: "body", Mode: FieldParsingKeyExistence, Dest: &cfg.Body}, |
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 makes
allow_bodyalways present (defaulting to true whenc.Bodyis nil) and also enablesbody: falseto flow through asallow_body: false. There isn’t currently a Go unit test asserting the emitted handler-config JSON containsallow_body: falsewhen configured, and contains the expected default whenbodyis omitted/null; adding an assertion incompiler_safe_outputs_config_test.gowould help prevent regressions.