Skip to content

Commit

Permalink
feat: update github to v59
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Feb 18, 2024
1 parent b498d03 commit e06e10a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.17.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.0
github.com/go-chi/chi/v5 v5.0.12
github.com/google/go-github/v55 v55.0.0
github.com/google/go-github/v59 v59.0.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/kelseyhightower/envconfig v1.4.0
github.com/migueleliasweb/go-github-mock v0.0.20
Expand Down Expand Up @@ -55,6 +55,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-github/v55 v55.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v55 v55.0.0 h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg=
github.com/google/go-github/v55 v55.0.0/go.mod h1:JLahOTA1DnXzhxEymmFF5PP2tSS9JVNj68mSZNDwskA=
github.com/google/go-github/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
Expand Down
2 changes: 1 addition & 1 deletion internal/batch/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (

func getTestServer(t *testing.T, failingRequests int) *httptest.Server {
cnt := 0
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
cnt++
if cnt <= failingRequests {
w.WriteHeader(http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion internal/config/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
awsConfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"github.com/kelseyhightower/envconfig"
"golang.org/x/oauth2"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/Masterminds/semver/v3"
"github.com/go-semantic-release/plugin-registry/pkg/registry"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"github.com/hashicorp/go-retryablehttp"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/plugin/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"github.com/migueleliasweb/go-github-mock/src/mock"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -69,7 +69,7 @@ cacce75a plugin_v1.0.0_linux_arm64

func getCheckSumServer(failingRequests int) *httptest.Server {
cnt := 0
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
cnt++
if cnt <= failingRequests {
w.WriteHeader(http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"cloud.google.com/go/firestore"
"github.com/Masterminds/semver/v3"
"github.com/go-semantic-release/plugin-registry/pkg/registry"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
)

type Plugin struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/server/handler_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/go-chi/chi/v5"
"github.com/go-semantic-release/plugin-registry/internal/metrics"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"go.opencensus.io/stats"
"go.opencensus.io/tag"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/server/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/go-semantic-release/plugin-registry/internal/config"
"github.com/go-semantic-release/plugin-registry/pkg/registry"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"github.com/migueleliasweb/go-github-mock/src/mock"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -119,7 +119,7 @@ func createS3Client(t *testing.T) (*s3.Client, func()) {
w.WriteHeader(http.StatusOK)
}))
s3Cfg, err := awsConfig.LoadDefaultConfig(context.TODO(),
awsConfig.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
awsConfig.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(_, _ string, _ ...interface{}) (aws.Endpoint, error) {
return aws.Endpoint{
URL: ts.URL,
HostnameImmutable: true,
Expand Down Expand Up @@ -220,7 +220,7 @@ func createPluginDoc(fsClient *firestore.Client, dlHost, fullName, latestRelease
}

func bootstrapDatabase(t *testing.T, fsClient *firestore.Client) func() {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
_, _ = io.WriteString(w, "test-file")
}))
Expand Down
2 changes: 1 addition & 1 deletion internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/go-semantic-release/plugin-registry/internal/config"
"github.com/google/go-github/v55/github"
"github.com/google/go-github/v59/github"
"github.com/patrickmn/go-cache"
"github.com/sirupsen/logrus"
"golang.org/x/sync/semaphore"
Expand Down

0 comments on commit e06e10a

Please sign in to comment.