I am currently working with the Github API (on enterprise edition). After some trial and error I was able to change the status of a pull request using curl -X POST:
curl -u <token>:x-oauth-basic --header "Content-Type: application/json" -X POST --data "{\"state\":\"success\",\"target_url\":\"%BUILD_URL%\",\"description\":\"my description\",\"context\":\"continuous-integration/mycontext\"}" http://<server>/api/v3/repos/<myuserid>/<myreponame>/statuses/%COMMIT_SHA%
Run Code Online (Sandbox Code Playgroud)
and also to automatically merge if verything was successfull using curl -X PUT:
curl -u <token>:x-oauth-basic --header "Content-Type: application/json" -X PUT --data "{\"state\":\"merged\",\"commit_title\":\"automatic merge\",\"commit_message\":\"automatic merge\",\"sha\":\"%COMMIT_SHA%\",\"merge_method\":\"merge\"}" http://<server>/api/v3/repos/<myuserid>/<myreponame>/pulls/%PullRequest%/merge
Run Code Online (Sandbox Code Playgroud)
So far so good...But I am not able to delete the …