Skip to content

Commit

Permalink
update url and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kfbustam committed Dec 9, 2024
1 parent ca20592 commit 6f1f905
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/platforms/github/GitHubAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,19 @@ export class GitHubAPI {
*
* This function retrieves all the comments associated with a given pull request.
* It makes a request to the GitHub API endpoint that returns all comments for the
* specified pull request and repository.
* specified pull request.
*
* https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#list-issue-comments-for-a-repository
* https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#list-issue-comments
*
* @returns {Promise<GitHubIssueComment[]>} A promise that resolves to an array of GitHub issue comments.
*
*/
getPullRequestComments = async (): Promise<GitHubIssueComment[]> => {
const pr = await this.getPullRequestInfo()
const prNumber = pr.number
const repo = this.repoMetadata.repoSlug
const owner = pr.base.repo.owner.login
return await this.getAllOfResource(`repos/${owner}/${repo}/issues/comments`)
return await this.getAllOfResource(`repos/${owner}/${repo}/issues/${prNumber}/comments`)
}

getPullRequestInlineComments = async (
Expand Down

0 comments on commit 6f1f905

Please sign in to comment.