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

Method fetchPullRequestReviewComment

app/src/lib/api.ts:946–970  ·  view source on GitHub ↗

* Fetch a pull request review comment (i.e. a comment that was posted as part * of a review of a pull request). * * @param owner The owner of the repository * @param name The name of the repository * @param commentId The ID of the comment * * @returns The comment if it was found

(
    owner: string,
    name: string,
    commentId: string
  )

Source from the content-addressed store, hash-verified

944 * occurred.
945 */
946 public async fetchPullRequestReviewComment(
947 owner: string,
948 name: string,
949 commentId: string
950 ): Promise<IAPIComment | null> {
951 try {
952 const response = await this.ghRequest(
953 'GET',
954 `repos/${owner}/${name}/pulls/comments/${commentId}`
955 )
956 if (response.status === HttpStatusCode.NotFound) {
957 log.warn(
958 `fetchPullRequestReviewComment: '${owner}/${name}/pulls/comments/${commentId}' returned a 404`
959 )
960 return null
961 }
962 return await parsedResponse<IAPIComment>(response)
963 } catch (e) {
964 log.warn(
965 `fetchPullRequestReviewComment: an error occurred for '${owner}/${name}/pulls/comments/${commentId}'`,
966 e
967 )
968 return null
969 }
970 }
971
972 /** Fetch a repo by its owner and name. */
973 public async fetchRepository(

Callers 1

Calls 2

ghRequestMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected