diff --git a/go.mod b/go.mod index 3d170acd7a..45f3491710 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/fatih/color v1.13.0 github.com/google/go-github/v41 v41.0.0 github.com/korovkin/limiter v0.0.0-20220422174850-01f593e64cf7 - github.com/ktrysmt/go-bitbucket v0.9.54 + github.com/ktrysmt/go-bitbucket v0.9.55 github.com/mitchellh/go-homedir v1.1.0 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.13.0 diff --git a/go.sum b/go.sum index 970135f166..d9811a80f5 100644 --- a/go.sum +++ b/go.sum @@ -163,8 +163,8 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/ktrysmt/go-bitbucket v0.9.54 h1:QRuLyUCuxsWs+7EL5YLbvT6oijNWSmk2C4/yp1yIjM0= -github.com/ktrysmt/go-bitbucket v0.9.54/go.mod h1:aB/IUpoFE65X84soIfgUPT53bzp/jfYoffLN2mg3bFc= +github.com/ktrysmt/go-bitbucket v0.9.55 h1:eOrF7wWmG4wz5iPr7ymgyWLoti2OfmrhU2tmT6yhAu8= +github.com/ktrysmt/go-bitbucket v0.9.55/go.mod h1:y5wrrDHCGUFAtuC43GyLBeFigq7rwrh4HqeDOOyZT+A= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -207,13 +207,15 @@ github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/xanzy/go-gitlab v0.73.1 h1:UMagqUZLJdjss1SovIC+kJCH4k2AZWXl58gJd38Y/hI= diff --git a/vendor/github.com/ktrysmt/go-bitbucket/repository.go b/vendor/github.com/ktrysmt/go-bitbucket/repository.go index 8dae12a1e1..5f8f74e8e0 100644 --- a/vendor/github.com/ktrysmt/go-bitbucket/repository.go +++ b/vendor/github.com/ktrysmt/go-bitbucket/repository.go @@ -309,17 +309,13 @@ func (r *Repository) GetFileContent(ro *RepositoryFilesOptions) ([]byte, error) return nil, err } - response, err := r.c.execute("GET", urlStr, "") + resBody, err := r.c.executeRaw("GET", urlStr, "") if err != nil { return nil, err } + defer resBody.Close() - content, ok := response.([]byte) - if !ok { - return nil, fmt.Errorf("requested path is not a file") - } - - return content, nil + return ioutil.ReadAll(resBody) } func (r *Repository) ListFiles(ro *RepositoryFilesOptions) ([]RepositoryFile, error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 73ee4bcd72..7d8ca13e04 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -46,7 +46,7 @@ github.com/inconshreveable/mousetrap # github.com/korovkin/limiter v0.0.0-20220422174850-01f593e64cf7 ## explicit; go 1.17 github.com/korovkin/limiter -# github.com/ktrysmt/go-bitbucket v0.9.54 +# github.com/ktrysmt/go-bitbucket v0.9.55 ## explicit; go 1.14 github.com/ktrysmt/go-bitbucket # github.com/magiconair/properties v1.8.6