How do i get the list of Reviewers for a pull request using Github api?

半世苍凉 提交于 2019-12-05 01:27:27

Just went through this problem with the following solution.

According to GitHub's documentation:

GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers

Pull request authors and repository owners and collaborators can request a pull request review from anyone with write access to the repository. Each requested reviewer will receive a notification asking them to review the pull request.

Test Request:

https://api.github.com/repos/roliveiravictor/demo-rust-learning/pulls/1/requested_reviewers

Response:

{
    "users": [],
    "teams": []
}

Since nobody is settle on this public test repo, of course it's empty. Remember, they need to have write access on your repository. This worked pretty well on my private project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!