diff --git a/.licenses/go/github.com/google/go-github/github.dep.yml b/.licenses/go/github.com/google/go-github/v32/github.dep.yml similarity index 88% rename from .licenses/go/github.com/google/go-github/github.dep.yml rename to .licenses/go/github.com/google/go-github/v32/github.dep.yml index 3244f94..812118b 100644 --- a/.licenses/go/github.com/google/go-github/github.dep.yml +++ b/.licenses/go/github.com/google/go-github/v32/github.dep.yml @@ -1,12 +1,12 @@ --- -name: github.com/google/go-github/github -version: v17.0.0+incompatible +name: github.com/google/go-github/v32/github +version: v32.1.0 type: go summary: Package github provides a client for using the GitHub API. -homepage: https://godoc.org/github.com/google/go-github/github +homepage: https://godoc.org/github.com/google/go-github/v32/github license: bsd-3-clause licenses: -- sources: go-github@v17.0.0+incompatible/LICENSE +- sources: v32@v32.1.0/LICENSE text: | Copyright (c) 2013 The go-github AUTHORS. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-github@v17.0.0+incompatible/README.md +- sources: v32@v32.1.0/README.md text: |- This library is distributed under the BSD-style license found in the [LICENSE](./LICENSE) file. diff --git a/go.mod b/go.mod index 8341ddc..03cba41 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,7 @@ go 1.14 require ( github.com/go-git/go-git/v5 v5.1.0 - github.com/google/go-github v17.0.0+incompatible - github.com/google/go-querystring v1.0.0 // indirect + github.com/google/go-github/v32 v32.1.0 github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e github.com/pkg/errors v0.8.1 github.com/spf13/cobra v1.0.0 diff --git a/go.sum b/go.sum index eeedd03..346b284 100644 --- a/go.sum +++ b/go.sum @@ -53,12 +53,13 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II= +github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= diff --git a/internal/pull/pull.go b/internal/pull/pull.go index 851888e..e700922 100644 --- a/internal/pull/pull.go +++ b/internal/pull/pull.go @@ -20,7 +20,7 @@ import ( "github.com/go-git/go-git/v5/config" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/google/go-github/github" + "github.com/google/go-github/v32/github" "github.com/pkg/errors" ) @@ -186,7 +186,7 @@ func (pullService *pullService) pullReleases() error { if err != nil { return errors.Wrap(err, "Error removing existing cached asset.") } - reader, redirectURL, err := pullService.githubDotComClient.Repositories.DownloadReleaseAsset(pullService.ctx, sourceOwner, sourceRepository, asset.GetID()) + reader, redirectURL, err := pullService.githubDotComClient.Repositories.DownloadReleaseAsset(pullService.ctx, sourceOwner, sourceRepository, asset.GetID(), http.DefaultClient) if err != nil { return errors.Wrap(err, "Error downloading asset.") } diff --git a/internal/pull/pull_test.go b/internal/pull/pull_test.go index b66f9d2..7180fbf 100644 --- a/internal/pull/pull_test.go +++ b/internal/pull/pull_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/github/codeql-action-sync/test" - "github.com/google/go-github/github" + "github.com/google/go-github/v32/github" ) const initialActionRepository = "./pull_test/codeql-action-initial.git"