相关疑难解决方法(0)

Github enterprise API delete branch after merge

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 …

git curl github github-api

5
推荐指数
1
解决办法
1037
查看次数

标签 统计

curl ×1

git ×1

github ×1

github-api ×1