Skip to content

Commit

Permalink
Merge pull request #727 from cloudflare/gh
Browse files Browse the repository at this point in the history
Update google/go-github to v55
  • Loading branch information
prymitive committed Sep 18, 2023
2 parents 0448de7 + ef23497 commit 198fc3f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
codecov:
token: fa0dae01-b3cf-46b7-b7d2-254e990ac824
require_ci_to_pass: false
notify:
wait_for_ci: false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/fatih/color v1.15.0
github.com/gkampitakis/go-snaps v0.4.10
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v50 v50.2.0
github.com/google/go-github/v55 v55.0.0
github.com/hashicorp/hcl/v2 v2.18.0
github.com/klauspost/compress v1.16.7
github.com/prometheus/client_golang v1.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v50 v50.2.0 h1:j2FyongEHlO9nxXLc+LP3wuBSVU9mVxfpdYUexMpIfk=
github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H4m6xFZlT43q8Q=
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-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand Down
7 changes: 3 additions & 4 deletions internal/reporter/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v50/github"
"github.com/google/go-github/v55/github"
"github.com/rs/zerolog/log"
"golang.org/x/oauth2"

Expand Down Expand Up @@ -52,14 +52,13 @@ func NewGithubReporter(version, baseURL, uploadURL string, timeout time.Duration
&oauth2.Token{AccessToken: gr.authToken},
)
tc := oauth2.NewClient(context.Background(), ts)
gr.client = github.NewClient(tc)

if gr.uploadURL != "" && gr.baseURL != "" {
gr.client, err = github.NewEnterpriseClient(gr.baseURL, gr.uploadURL, tc)
gr.client, err = gr.client.WithEnterpriseURLs(gr.baseURL, gr.uploadURL)
if err != nil {
return gr, fmt.Errorf("creating new GitHub client: %w", err)
}
} else {
gr.client = github.NewClient(tc)
}

return gr, nil
Expand Down

0 comments on commit 198fc3f

Please sign in to comment.