Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Bad Request when setting branch permissions using groups #130

Open
maikeffi opened this issue Apr 21, 2021 · 2 comments
Open

400 Bad Request when setting branch permissions using groups #130

maikeffi opened this issue Apr 21, 2021 · 2 comments

Comments

@maikeffi
Copy link

maikeffi commented Apr 21, 2021

When setting branch permissions restrict_merges am passing map[string]string{"admin": "administrator", "dev": "developer"} as the BranchRestrictionsOptions.Groups value . It throws an error 400 Bad Request and sets the permission group to Everybody

@maikeffi
Copy link
Author

maikeffi commented Apr 21, 2021

Why are we passing a map and not a array of strings like Users . The buildBranchRestrictionsBody in BranchRestrictions.Create does not use the key value of the maps . Another Observation was branchRestrictionsBodyGroup uses the field Name When i used slug manually adding the restriction it seemed to work

"groups":[ { "slug":"developers" }, { "slug":"administrators" } ]

@ktrysmt
Copy link
Owner

ktrysmt commented Apr 21, 2021

Oh. Surely I created the struct and method. But, maybe the rules of Atlassian's bitbucket api have changed over the years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants