Last active
March 11, 2021 21:10
-
-
Save flavianmissi/aff629739006e66a2c3f4e4b96981e57 to your computer and use it in GitHub Desktop.
add reviewer to PR
This file contains hidden or 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
# usage: | |
# add_reviewer_to_PR <your-username> <reviewer> <one-time-password> <PR-nr> | |
# you'll be prompted for your github password. | |
function add_reviewer_to_PR { | |
user=$1 | |
reviewer=$2 | |
OTP=$3 | |
PR=$4 | |
curl -X POST -u "$user" -H 'Content-Type: application/json' -H "X-GitHub-OTP: $OTP" -d "{\"reviewers\": [\"$reviewer\"]}" https://api.github.com/repos/mindoktor/mindoktor/pulls/"$PR"/requested_reviewers | |
} |
Maybe add comments and an example on how to call the function
Done!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe add comments and an example on how to call the function