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

Method fetchPullRequestReview

app/src/lib/api.ts:1284–1301  ·  view source on GitHub ↗

* Fetch a single pull request review in the given repository

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

Source from the content-addressed store, hash-verified

1282 * Fetch a single pull request review in the given repository
1283 */
1284 public async fetchPullRequestReview(
1285 owner: string,
1286 name: string,
1287 prNumber: string,
1288 reviewId: string
1289 ) {
1290 try {
1291 const path = `/repos/${owner}/${name}/pulls/${prNumber}/reviews/${reviewId}`
1292 const response = await this.ghRequest('GET', path)
1293 return await parsedResponse<IAPIPullRequestReview>(response)
1294 } catch (e) {
1295 log.debug(
1296 `failed fetching PR review ${reviewId} for ${owner}/${name}/pulls/${prNumber}`,
1297 e
1298 )
1299 return null
1300 }
1301 }
1302
1303 /** Fetches all reviews from a given pull request. */
1304 public async fetchPullRequestReviews(

Callers 1

Calls 2

ghRequestMethod · 0.95
debugMethod · 0.80

Tested by

no test coverage detected