MCPcopy
hub / github.com/mislav/hub / PullRequest

Method PullRequest

github/client.go:97–112  ·  view source on GitHub ↗
(project *Project, id string)

Source from the content-addressed store, hash-verified

95}
96
97func (client *Client) PullRequest(project *Project, id string) (pr *PullRequest, err error) {
98 api, err := client.simpleApi()
99 if err != nil {
100 return
101 }
102
103 res, err := api.Get(fmt.Sprintf("repos/%s/%s/pulls/%s", project.Owner, project.Name, id))
104 if err = checkStatus(200, "getting pull request", res, err); err != nil {
105 return
106 }
107
108 pr = &PullRequest{}
109 err = res.Unmarshal(pr)
110
111 return
112}
113
114func (client *Client) PullRequestPatch(project *Project, id string) (patch io.ReadCloser, err error) {
115 api, err := client.simpleApi()

Callers 4

transformMergeArgsFunction · 0.95
checkoutFunction · 0.95
checkoutPrFunction · 0.80
showPrFunction · 0.80

Calls 4

simpleApiMethod · 0.95
checkStatusFunction · 0.85
GetMethod · 0.80
UnmarshalMethod · 0.80

Tested by

no test coverage detected