Skip to content

Conversation

@zahiar
Copy link
Contributor

@zahiar zahiar commented Nov 22, 2021

The API expects the group slug to be passed in, without this, API returns a HTTP 400 error. Also, fixed branchRestrictionsBodyGroup struct, specifically the inner links struct which accidentally included full_slug & slug - both of which should be at the root level.

Previously a request with this payload

{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"name":"za-test"}]}

Would return

{"type":"error","error":{"message":"malformed groups"}}

With the fixed payload, we now get a success response.

{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"slug":"za-test"}]}

The API expects the group slug to be passed in, without this, API returns a HTTP 400 error. Also, fixed `branchRestrictionsBodyGroup` struct, specifically the inner `links` struct which accidentally included `full_slug` & `slug` - both of which should be at the root level.

Previously a request with this payload
```
{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"name":"za-test"}]}
```

Would return
```
{"type":"error","error":{"message":"malformed groups"}}
```

With the fixed payload, we now get a success response.
```
{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"slug":"za-test"}]}
```
Copy link
Owner

@ktrysmt ktrysmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ktrysmt ktrysmt merged commit c4d4a8c into ktrysmt:master Nov 25, 2021
@zahiar zahiar deleted the fix-branch-restriction-group-bug branch November 25, 2021 19:15
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

Successfully merging this pull request may close these issues.

2 participants