gfleury / go-bitbucket-v1 Goto Github PK
View Code? Open in Web Editor NEWBitbucket-server API (v1.0) library for Golang.
License: MIT License
Bitbucket-server API (v1.0) library for Golang.
License: MIT License
Hi! Seems like SSH-keys endpoints are missing?
API-documentation: https://docs.atlassian.com/bitbucket-server/rest/7.12.1/bitbucket-ssh-rest.html
Bitbucket APIs support setting the default branch.
The SetDefaultBranch doesn't accept a branch name, neither does it include it in the request body.
As part of a previous pull request I encountered a weird behaviour with some of the tests. This ticket is created as a result of the response by @gfleury.
I run go version go1.13.6 linux/amd64
on Fedora 31
.
Running the tests locally using go test
results in (latest master
):
--- FAIL: TestGetWebhooksResponse (0.00s)
--- FAIL: TestGetWebhooksResponse/Empty_list (0.00s)
api_response_test.go:293: GetWebhooksResponse() = [], want []
--- FAIL: TestGetUsersPermissionResponse (0.00s)
--- FAIL: TestGetUsersPermissionResponse/Empty_list (0.00s)
api_response_test.go:377: GetUsersPermissionResponse() = [], want []
On the local side these errors can be fixed easily e.g. with replacing the test for an empty slice with nil
as in the following example:
func TestGetWebhooksResponse(t *testing.T) {
type args struct {
r *APIResponse
}
tests := []struct {
...
}{
{
name: "Empty list",
....
// Here we change the test
want: []Webhook{} => nil,
wantErr: false,
},
Unfortunately this fix does not apply when running the tests inside Travis CI. Travis CI is failing with the exact same error message as above. So I am in a situation where I can have successfully running tests either here or locally.
The initial guess was that the used go version here (1.11) was somehow part of this behaviour. But a test with an updated Travis CI go version did not fix this.
I was not able to track down the issue by now. I may have to cross reference the tests with a second go setup to exclude the possibility to have a problem on my side. (I currently doubt to see a difference with that)
In relation to this issue in argocd, argoproj/argo-cd#9607 I'ld love the following feature. Support tlsConf in the client setup.
Current DefaultApi.CreateAccessToken
method supports only REPO_ADMIN and PROJECT_READ permissions.
It would be useful to support all other permissions: REPO_READ, REPO_WRITE, PROJECT_ADMIN, PROJECT_WRITE.
The function Update_50
has the description that it should be able to do it but it doesn't take any arguments so I'm thinking that if Update_50
is autogenerated, then maybe the generation for that method is broken..
CreateBranch in DefaultAPI does not have a way to pass any post parameters. Am I missing something or it's not a full implementation as the swagger files suggest no input post parameters as well.
https://github.com/argoproj/argo-events/blob/340627059538af49f095e497fdef1b9e888f393d/eventsources/sources/bitbucketserver/start.go#L290 references this lib
but curl requests to the webook still succeed without any webhook secret passed
i couldn't see something like https://github.com/go-playground/webhooks/blob/v5.17.0/bitbucket-server/bitbucketserver.go#L129-L141
The other API endpoints I've been using seem to use int64 but GetPullRequest seems to take in an int. Is this a typo?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.