GitHub Octokit: How to make a pull request review comment as resolved?

1k Views Asked by At

I’m looking for a way to mark a review comment as ‘RESOLVED’ via the GitHub rest API via Octokit. I’m having a hard time finding documentation on this.

So far I only found how to update a review comment for a pull request on here but not to mark them as resolved https://docs.github.com/en/rest/reference/pulls#update-a-review-comment-for-a-pull-request

Any pointers would be appreciated.

1

There are 1 best solutions below

0
On

You already have the link to right GitHub API. Just call it in your pipelines. If you are using Jenkins, you can make the call using HTTP Request plugin.

Example:

withCredentials([string(credentialsId: 'GitHubUserToken', variable: 'TOKEN')]) {
    response = httpRequest customHeaders: [
        [name: 'Authorization', value: "Token " + "$TOKEN"],
        [name: 'accept', value: "application/vnd.github.v3+json"]
        ],
    httpMode: 'GET',
    validResponseCodes: '200',
    url: "https://api.github.com/repos/{owner}/{repo}/pulls/comments/{comment_id}"
}