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

Function resolveItemRepo

pkg/cli/outcome_eval.go:354–364  ·  view source on GitHub ↗

resolveItemRepo returns the repo to use for API calls, preferring the item's repo field.

(item CreatedItemReport, repoOverride string)

Source from the content-addressed store, hash-verified

352
353// resolveItemRepo returns the repo to use for API calls, preferring the item's repo field.
354func resolveItemRepo(item CreatedItemReport, repoOverride string) string {
355 if item.Repo != "" {
356 return item.Repo
357 }
358 if item.URL != "" {
359 if r := parseRepoFromURL(item.URL); r != "" {
360 return r
361 }
362 }
363 return repoOverride
364}
365
366// resolveItemNumber returns the object number, trying item.Number first then URL parsing.
367func resolveItemNumber(item CreatedItemReport) int {

Callers 15

evalAddLabelsFunction · 0.85
evalAddReviewerFunction · 0.85
evalCreatePullRequestFunction · 0.85
TestResolveItemRepoFunction · 0.85
evalRetainedUpdateFunction · 0.85
evalCreateIssueFunction · 0.85
evalAddCommentFunction · 0.85
evalCloseStickyFunction · 0.85
evalCloseDiscussionFunction · 0.85
evalCreateDiscussionFunction · 0.85
evalHideCommentFunction · 0.85

Calls 1

parseRepoFromURLFunction · 0.85

Tested by 1

TestResolveItemRepoFunction · 0.68