(project *Project, id string)
| 95 | } |
| 96 | |
| 97 | func (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 | |
| 114 | func (client *Client) PullRequestPatch(project *Project, id string) (patch io.ReadCloser, err error) { |
| 115 | api, err := client.simpleApi() |
no test coverage detected