ktrysmt/go-bitbucket

error: unsupported protocol scheme for Pipelines.List(opt)

hkailantzis opened this issue · 5 comments

Hi there,

Thanks very much for the repo. I'm relatively new to GoLang, and wondering what could be the problem when trying to list the pipelines for a repo. PullRequests.Gets() methods or Repository.GetFileBlob works fine for me. So, I'm wondering if something else missing with the URL bit of Pipelines.list() call: ->

https://github.com/ktrysmt/go-bitbucket/blob/master/pipelines.go#L14

Error I'm getting is: unsupported protocol scheme . I just noticed that PullRequests.Gets method is using: p.c.GetApiBaseURL(), which is missing from the Pipelines.list() call. Could that be causing the issue ?

https://github.com/ktrysmt/go-bitbucket/blob/master/pullrequests.go#L31

func getPipelinesTest() {
	
	c := bitbucket.NewBasicAuth("username", "password")

	opt := &bitbucket.PipelinesOptions{
		Owner:    "owner",
		RepoSlug: "test_project",
	}

	res, err := c.Repositories.Pipelines.List(opt)
	if err != nil {
		panic(err)
	}

	log.Println(res)
}

Hmm, I'll check it out. Thank you for the report.

Thanks @ktrysmt, that's great.

@ktrysmt, any info/feedback if its possible to fix this ? Thanks in advance!

@hkailantzis I am aware this is an old issue but are you still able to replicate the issue?

I am on using version v0.9.54 and I am unable to replicate

@Jamess-Lucass , is working it seems now, not sure what was the problem. closing this, thanks!