Hello I am sending this thing for that API,
I have all headers good and all kind of authentications good but I get this error
{"type": "error", "error": {"message": "Something went wrong", "id": "9557509a980f4b00b77eb1623d7b1e5b"}}
Hi Jose Fernando and welcome to the community!
I see that the property "branch_match_kind" is missing from your call's data. This is necessary for the API call, and depending on its value you should use either "pattern" or "branch_type" but not both. Please allow me to explain:
If you want to create the branch restriction for the branch named development, your data should look like this:
{
"branch_match_kind": "glob",
"pattern": "development",
"kind": "require_approvals_to_merge",
"value": 2
}
If you want to create the branch restriction based on the repo's branching model and use the branch you set as Development branch from Repository settings > Branching model, then your data should look like this:
{
"branch_match_kind": "branching_model",
"branch_type": "development",
"kind": "require_approvals_to_merge",
"value": 2
}
This second example will create a restriction for the branch defined as Development branch from from Repository settings > Branching model, and if you change the Development branch from this page, then the branch restriction will be updated accordingly.
Please feel free to let me know if you have any questions!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.