CURL:
curl -s -H "Authorization: token ghp_BWuQzbiDANEvrQP9vZbqa5LHBAxxIzwi2gM7" \
-X POST -d '{"event":"APPROVE"}' \
"https://api.github.com/repos/tech-security/chatbot/pulls/4/reviews"
Python Code:
import requests
headers = {
'Authorization': 'token ghp_BWuQzbiDANEvrQP9vZbqa5LHBAxxIzwi2gM7',
}
#data = '{"body":"Some Comments", "event":"APPROVE"}'
#data = '{"body":"Some Comments"}'
data = '{"event":"APPROVE"}'
response = requests.post('https://api.github.com/repos/tech-security/chatbot/pulls/4/reviews', headers=headers, data=data)
print (response.json())
Note: above github token is dummy, so don't freak out please! :D