computeRequiredFieldAdditions returns a map of tool name → required fields to add based on the safe-outputs configuration.
(safeOutputs *SafeOutputsConfig)
| 244 | // computeRequiredFieldAdditions returns a map of tool name → required fields to add |
| 245 | // based on the safe-outputs configuration. |
| 246 | func computeRequiredFieldAdditions(safeOutputs *SafeOutputsConfig) map[string][]string { |
| 247 | additions := make(map[string][]string) |
| 248 | if safeOutputs == nil { |
| 249 | return additions |
| 250 | } |
| 251 | if safeOutputs.CreateIssues != nil && safeOutputs.CreateIssues.RequireTemporaryID { |
| 252 | additions["create_issue"] = []string{"temporary_id"} |
| 253 | } |
| 254 | if safeOutputs.CreatePullRequests != nil && safeOutputs.CreatePullRequests.RequireTemporaryID { |
| 255 | additions["create_pull_request"] = []string{"temporary_id"} |
| 256 | } |
| 257 | return additions |
| 258 | } |
| 259 | |
| 260 | // generateToolsMetaJSON generates the content for tools_meta.json: a compact file |
| 261 | // that captures the workflow-specific customisations (description constraints, |
no outgoing calls