I am having trouble with changing the default branch from master to new_branch using the api.
The error that I am getting is
“message”: “Validation Failed”,
“message”: “The branch new_branch was not found. Please push that ref first or create it via the Git Data API.”,
But I can change it on website. Is there a reason why I cannot do that using the API?
If I can change it on website, it should be the same when I change it using API, right?
I’ also tried to fetch the the branches of the repo using API and my target branch is there. then, there is no protection on those branches.
JSON data passed:
“name” : “git_practice_1”,
“default_branch” : “devel”
Please let me know if you need more information.
I hope somebody can address my issue.
Thanks and more power.