Branch creation using API v3 is broken on GitLab.com
Summary
Branch creation using API v3 is broken on GitLab.com
Steps to reproduce
-
Take
curl
example of creating branch from documentation. I mean this example:curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/repository/branches?branch_name=newbranch&ref=master"
-
Replace private token with your own
-
Replace repo id with the id of your repo
-
Run request
What is the current bug behavior?
Branch is not created. Server responds with a error.
What is the expected correct behavior?
Branch is created.
Relevant logs and/or screenshots
Server's response:
< HTTP/1.1 400 Bad Request
< Server: nginx
< Date: Thu, 16 Mar 2017 21:35:11 GMT
< Content-Type: application/json
< Content-Length: 29
< Cache-Control: no-cache
< Vary: Origin
< X-Request-Id: 18fd1f7a-d979-4409-a645-febba9131c0b
< X-Runtime: 0.234309
<
* Curl_http_done: called premature == 0
* Connection #0 to host gitlab.com left intact
{"error":"branch is missing"}
Output of checks
This bug happens on GitLab.com