Answer a question

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.

Answers

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.

Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐