I’ve recently been tasked with the automatic merging and deleting of a release branch that is protected during its lifespan and when I was trying to work with the documentation for protected branches API, it seems that the instructions are not entirely correct.
At least from what I experienced the documentation specifically mentions that the levels of access should be specified by
allowed_to_unprotect (see here). However when i use the API call with parameters named like that, the API returns a 400: Bad request.
I have checked the protected branches of our project in API and those parameters are actually called
unprotect_access_levels and when I try to call the API with these parameters it works.
Now I’m not sure whether to report this or I do not have all the info but is there some other explanation for why the “official docs approach” does not work?
PS: Also in the docs there does not seem to be an example on how to set multiple users for various access types.