diff --git a/internal/bitbucket/bitbucket.go b/internal/bitbucket/bitbucket.go index 06111903..f6819df2 100644 --- a/internal/bitbucket/bitbucket.go +++ b/internal/bitbucket/bitbucket.go @@ -181,6 +181,9 @@ func NewClient(workspace, repoSlug string, opts ...ClientOption) (*Client, error return nil, err } } + if c.baseURL == "" { + c.baseURL = DefaultBaseURL + } return c, nil } diff --git a/internal/github/github.go b/internal/github/github.go index 3e85a94c..acbc1084 100644 --- a/internal/github/github.go +++ b/internal/github/github.go @@ -102,6 +102,9 @@ func NewClient(repo string, opts ...ClientOption) (*Client, error) { return nil, err } } + if c.baseURL == "" { + c.baseURL = DefaultBaseURL + } return c, nil } diff --git a/internal/gitlab/gitlab.go b/internal/gitlab/gitlab.go index e281888d..a16e46e3 100644 --- a/internal/gitlab/gitlab.go +++ b/internal/gitlab/gitlab.go @@ -61,6 +61,9 @@ func NewClient(project string, opts ...ClientOption) (*Client, error) { return nil, err } } + if c.baseURL == "" { + c.baseURL = DefaultBaseURL + } return c, nil }