MCPcopy Create free account
hub / github.com/cli/cli / pullRequestResource

Function pullRequestResource

pkg/cmd/pr/view/hint.go:18–26  ·  view source on GitHub ↗
(baseRepo ghrepo.Interface, pr *api.PullRequest)

Source from the content-addressed store, hash-verified

16}
17
18func pullRequestResource(baseRepo ghrepo.Interface, pr *api.PullRequest) string {
19 if pr.URL != "" {
20 return pr.URL
21 }
22 if baseRepo != nil && pr.Number > 0 {
23 return ghrepo.GenerateRepoURL(baseRepo, "pull/%d", pr.Number)
24 }
25 return ""
26}

Callers 1

printEventListenHintFunction · 0.85

Calls 1

GenerateRepoURLFunction · 0.92

Tested by

no test coverage detected