Im trying to use a simple(er) Python 3.5 script to allow me to change the status of Pull Requests on GitHub, however I am getting a rather strange error (because I tested the code with curl and had no issues)
Here's the relevant part of my code:
payload = {"state": "success", "target_url": "https://github.com/Electromaster232/FireSurvival-Docs", "description": "hi", "context": "pullrequest"}
print(payload)
headers = {"Authorization": "token <token removed>", "Host": "api.github.com", "Content-Type": "application/json"}
res = requests.post(url, data=payload, headers=headers)
print(res.text)
This returns:
<Response [400]>
{"message":"Problems parsing JSON","documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}
After looking at similar questions, I don't see an answer that helped.