Tags: sparkcentral/go-bitbucket
Tags
Loop over paginated responses (ktrysmt#183) Co-authored-by: Bill Rich <bill.rich@trufflesec.com>
Deprecate Repositories.ListForTeam (closes ktrysmt#181) (ktrysmt#182) * Add tests for Repositories.GetFor(Account|Team) * Deprecate Repositories.GetForTeam (closes ktrysmt#181) Make Repositories.GetForTeam an alias to Repositories.GetForAccount, and mark the former as deprecated, since they both do the same.
Add GetPipelineConfig (closes ktrysmtGH-176) (ktrysmt#177) * Add repository.GetPipelineConfig * Add tests for (Get|Update)PipelineConfig Co-authored-by: David Triendl <david.triendl@nuvoair.com>
Fix bug with incorrect request payload for groups (Branch Restriction… …s) (ktrysmt#172) 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"}]} ```
Add `comment` field to Deploy Key response data structure (ktrysmt#169) When you add a deploy key that contains a comment, the Bitbucket API splits out the comment and returns it in a separate `comment` field in the API. For example, `key = "ssh-rsa AAAA...=== my@comment.example"` API response ``` key = "ssh-rsa AAAA...===" comment = "my@comment.example" ```
Fix issue with `fork_policy` not being updated (ktrysmt#168) Due to an undocumented quirk in Bitbucket's API, when updating a repository, you have to pass in two additional fields which are then used together, to match the string representation of the fork_policy (which the API returns - the other two fields are not returned). Here is a link to an oustanding bug ticket filed with Atlassian: https://jira.atlassian.com/browse/BCLOUD-13093 Also added tests to cover the behaviour above, as well as an additional one for creating a repository, to ensure this functionality was not broken with the changes introduced.
Add repository.DeleteBranch (ktrysmt#164) Implementing Rest Call : https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/refs/branches/%7Bname%7D#delete
PreviousNext