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

Function pullRequestResource

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

Source from the content-addressed store, hash-verified

26}
27
28func pullRequestResource(baseRepo ghrepo.Interface, pr *api.PullRequest) string {
29 if pr.URL != "" {
30 return pr.URL
31 }
32 if baseRepo != nil && pr.Number > 0 {
33 return ghrepo.GenerateRepoURL(baseRepo, "pull/%d", pr.Number)
34 }
35 return ""
36}

Callers 1

printEventListenHintFunction · 0.85

Calls 1

GenerateRepoURLFunction · 0.92

Tested by

no test coverage detected