Reputation: 14148
How do you delete a GitHub pull request requested review? This is about deleting the request for review on a pull request, not the pull request itself. I can't find a way using the website.
I also tried using the REST API:
curl -i -X DELETE -u cherryblossom000 https://api.github.com/repos/<repo owner>/<repo name>/pulls/<pull number>/requested_reviewers -d '{"reviewers":["reviewer name"]}'
but I get this error:
{
"message": "Validation Failed",
"errors": [
"Could not add requested reviewers to pull request."
],
"documentation_url": "https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request"
}
The GraphQL API doesn't seem to have a mutation to delete a review request either.
Upvotes: 6
Views: 9266
Reputation: 108
I too had this problem and also got several "Validation failed" messages. So I figured it might be because I didn't have direct permissions on the repo.
After emailing Github developer support, they confirmed that you can delete (or dismiss) a review request, provided you have direct permissions on the repository.
In conclusion, your REST API approach is correct. You only get the "Validation failed" message if you do not have direct permissions on the repo.
Upvotes: 2