MCPcopy Create free account
hub / github.com/github/gh-aw / extractCurrentIssueUpdateState

Function extractCurrentIssueUpdateState

pkg/cli/outcome_eval_update.go:221–233  ·  view source on GitHub ↗
(repo string, number int)

Source from the content-addressed store, hash-verified

219}
220
221func extractCurrentIssueUpdateState(repo string, number int) (map[string]any, bool, error) {
222 issue, err := outcomeUpdateGHAPIGet(fmt.Sprintf("issues/%d", number), repo)
223 if err != nil {
224 return nil, false, err
225 }
226 return map[string]any{
227 "title": mutableString(issue["title"]),
228 "body_hash": mutableBodyHash(issue["body"]),
229 "state": mutableString(issue["state"]),
230 "labels": extractNamedItems(issue["labels"], "name"),
231 "assignees": extractNamedItems(issue["assignees"], "login"),
232 }, false, nil
233}
234
235func extractCurrentPullRequestUpdateState(repo string, number int) (map[string]any, bool, error) {
236 pullRequest, err := outcomeUpdateGHAPIGet(fmt.Sprintf("pulls/%d", number), repo)

Callers

nothing calls this directly

Calls 3

mutableStringFunction · 0.85
mutableBodyHashFunction · 0.85
extractNamedItemsFunction · 0.85

Tested by

no test coverage detected