Created
July 29, 2022 03:55
-
-
Save Zeryther/e9f880e6db5c36ee76c4d002f6598784 to your computer and use it in GitHub Desktop.
Remove GitHub PR review request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For some reason, you can not remove a review request from a PR on GitHub in the UI | |
# I just misclicked in a repository and accidentally requested review and was unable to take it back. | |
# After a Google search, I found out that you can do it with the REST API (if you have the necessary permissions in the repo). | |
# | |
# GITHUB_USERNAME = Your GitHub username | |
# REPO_OWNER = The username of the GitHub user or organization that owns the repository | |
# REPO_NAME = The name of the target repository | |
# PULL_REQUEST_ID = The ID of the pull request | |
# GITHUB_REVIEWER_USERNAME = The GitHub username of the person you requested a review from | |
# | |
# Source: https://stackoverflow.com/questions/58619432/how-do-you-delete-a-github-pull-request-requested-review | |
# | |
curl -i -X DELETE -u GITHUB_USERNAME https://api.github.com/repos/REPO_OWNER/REPO_NAME/pulls/PULL_REQUEST_ID/requested_reviewers -d '{"reviewers":["GITHUB_REVIEWER_USERNAME"]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment