MCPcopy Create free account
hub / github.com/desktop/desktop / fetchPullRequest

Method fetchPullRequest

app/src/lib/api.ts:1270–1279  ·  view source on GitHub ↗

* Fetch a single pull request in the given repository

(owner: string, name: string, prNumber: string)

Source from the content-addressed store, hash-verified

1268 * Fetch a single pull request in the given repository
1269 */
1270 public async fetchPullRequest(owner: string, name: string, prNumber: string) {
1271 try {
1272 const path = `/repos/${owner}/${name}/pulls/${prNumber}`
1273 const response = await this.ghRequest('GET', path)
1274 return await parsedResponse<IAPIPullRequest>(response)
1275 } catch (e) {
1276 log.warn(`failed fetching PR for ${owner}/${name}/pulls/${prNumber}`, e)
1277 throw e
1278 }
1279 }
1280
1281 /**
1282 * Fetch a single pull request review in the given repository

Callers 1

Calls 2

ghRequestMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected