'How to resolve a GitHub Pull Request conversation (comment thread) using GitHub API?

I'm working on a process to migrate a repo from GitLab to GitHub.
One of the things this process needs to do is recreate Merge Requests from GitLab as Pull Requests in GitHub, along with their conversation history.

I managed to use the GitHub API to create the PR and comments from the original MR, but as some comment threads in the original MR were already resolved I wanted to use the API to mark those conversations in the PR as resolved as well, but I couldn't find a way to do it. Right now I just add a final comment to the conversation that says it it resolved, but I'm wondering if there is a better way to do it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source