From 6f1f905800793dd0d12a2b319f541bb53c830061 Mon Sep 17 00:00:00 2001 From: Karol Josef F Bustamante Date: Sun, 8 Dec 2024 19:08:09 -0500 Subject: [PATCH] update url and comment --- source/platforms/github/GitHubAPI.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/platforms/github/GitHubAPI.ts b/source/platforms/github/GitHubAPI.ts index 8bf456d5a..c19955dcd 100644 --- a/source/platforms/github/GitHubAPI.ts +++ b/source/platforms/github/GitHubAPI.ts @@ -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} A promise that resolves to an array of GitHub issue comments. * */ getPullRequestComments = async (): Promise => { 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 (