(repo string, number int)
| 233 | } |
| 234 | |
| 235 | func extractCurrentPullRequestUpdateState(repo string, number int) (map[string]any, bool, error) { |
| 236 | pullRequest, err := outcomeUpdateGHAPIGet(fmt.Sprintf("pulls/%d", number), repo) |
| 237 | if err != nil { |
| 238 | return nil, false, err |
| 239 | } |
| 240 | base, _ := pullRequest["base"].(map[string]any) |
| 241 | head, _ := pullRequest["head"].(map[string]any) |
| 242 | merged, _ := pullRequest["merged"].(bool) |
| 243 | return map[string]any{ |
| 244 | "title": mutableString(pullRequest["title"]), |
| 245 | "body_hash": mutableBodyHash(pullRequest["body"]), |
| 246 | "state": mutableString(pullRequest["state"]), |
| 247 | "base": mutableString(base["ref"]), |
| 248 | "draft": mutableBool(pullRequest["draft"]), |
| 249 | "head_sha": mutableString(head["sha"]), |
| 250 | }, merged, nil |
| 251 | } |
| 252 | |
| 253 | func extractNamedItems(raw any, key string) []string { |
| 254 | items, _ := raw.([]any) |
nothing calls this directly
no test coverage detected