tag:github.com,2008:https://github.com/sparkcentral/go-bitbucket/releasesTags from go-bitbucket2022-03-10T02:40:20Ztag:github.com,2008:Repository/468239126/v0.9.372022-03-10T02:40:20Zv0.9.37<p>Upon receiving unexpected status code, attempt to retrieve the body (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/185">k…</a></p>
<p><a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/185">…trysmt#185</a>)</p>
<p>* Upon receiving unexpected status code, attempt to retrieve the body</p>
<p>* Better error for when the response body cannot be read</p>
<p>* Add a helper to retrieve error with body</p>marcinwyszynskitag:github.com,2008:Repository/468239126/v0.9.362022-01-28T03:07:24Zv0.9.36: Loop over paginated responses (#183)<p>Loop over paginated responses (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/183">ktrysmt#183</a>)</p>
<p>Co-authored-by: Bill Rich <bill.rich@trufflesec.com></p>bill-richtag:github.com,2008:Repository/468239126/v0.9.352022-01-25T09:57:38Zv0.9.35: Deprecate Repositories.ListForTeam (closes #181) (#182)<p>Deprecate Repositories.ListForTeam (<span class="issue-keyword tooltipped tooltipped-se">closes</span> <a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/issues/181">ktrysmt#181</a>) (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/182">ktrysmt#182</a>)</p>
<p>* Add tests for Repositories.GetFor(Account|Team)</p>
<p>* Deprecate Repositories.GetForTeam (<span class="issue-keyword tooltipped tooltipped-se">closes</span> <a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/issues/181">ktrysmt#181</a>)</p>
<p>Make Repositories.GetForTeam an alias to Repositories.GetForAccount, and mark
<br />the former as deprecated, since they both do the same.</p>soulttag:github.com,2008:Repository/468239126/v0.9.342021-12-22T11:56:36Zv0.9.34snakeicetag:github.com,2008:Repository/468239126/v0.9.332021-12-13T15:00:07Zv0.9.33: Add GetPipelineConfig (closes GH-176) (#177)<p>Add GetPipelineConfig (<span class="issue-keyword tooltipped tooltipped-se">closes</span> <a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/issues/176">ktrysmtGH-176</a>) (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/177">ktrysmt#177</a>)</p>
<p>* Add repository.GetPipelineConfig</p>
<p>* Add tests for (Get|Update)PipelineConfig</p>
<p>Co-authored-by: David Triendl <david.triendl@nuvoair.com></p>soulttag:github.com,2008:Repository/468239126/v0.9.322021-12-03T05:08:19Zv0.9.32yahavitag:github.com,2008:Repository/468239126/v0.9.312021-11-25T13:15:20Zv0.9.31<p>Fix bug with incorrect request payload for groups (Branch Restriction…</p>
<p>…s) (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/172">ktrysmt#172</a>)</p>
<p>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.</p>
<p>Previously a request with this payload
<br />```
<br />{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"name":"za-test"}]}
<br />```</p>
<p>Would return
<br />```
<br />{"type":"error","error":{"message":"malformed groups"}}
<br />```</p>
<p>With the fixed payload, we now get a success response.
<br />```
<br />{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"slug":"za-test"}]}
<br />```</p>zahiartag:github.com,2008:Repository/468239126/v0.9.302021-11-17T14:23:17Zv0.9.30: Add `comment` field to Deploy Key response data structure (#169)<p>Add `comment` field to Deploy Key response data structure (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/169">ktrysmt#169</a>)</p>
<p>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.</p>
<p>For example,
<br />`key = "ssh-rsa AAAA...=== my@comment.example"`</p>
<p>API response
<br />```
<br />key = "ssh-rsa AAAA...==="
<br />comment = "my@comment.example"
<br />```</p>zahiartag:github.com,2008:Repository/468239126/v0.9.292021-11-14T05:07:45Zv0.9.29: Fix issue with `fork_policy` not being updated (#168)<p>Fix issue with `fork_policy` not being updated (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/168">ktrysmt#168</a>)</p>
<p>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).</p>
<p>Here is a link to an oustanding bug ticket filed with Atlassian: <a href="https://jira.atlassian.com/browse/BCLOUD-13093">https://jira.atlassian.com/browse/BCLOUD-13093</a></p>
<p>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.</p>zahiartag:github.com,2008:Repository/468239126/v0.9.282021-10-17T01:51:05Zv0.9.28: Add repository.DeleteBranch (#164)<p>Add repository.DeleteBranch (<a class="issue-link js-issue-link" href="https://github.com/ktrysmt/go-bitbucket/pull/164">ktrysmt#164</a>)</p>
<p>Implementing Rest Call :</p>
<p><a href="https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/refs/branches/%7Bname%7D#delete">https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/refs/branches/%7Bname%7D#delete</a></p>chmouel