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

Viewed 209
1 Answers

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}"
}
Related