Skip to content

Commit

Permalink
Revert back to go-github v32 (#261)
Browse files Browse the repository at this point in the history
In v33, the library removed some preview media type headers that are
still required in GitHub Enterprise, although they are no longer
required on GitHub.com. Until there's a GHE release that drops the
requirement for the preview media types, we'll need to stick with the
older version.

Since we otherwise weren't taking advantage of new features or changes,
this should be fine.
  • Loading branch information
bluekeyes authored Jan 21, 2021
1 parent 71ccb32 commit 0a34f2a
Show file tree
Hide file tree
Showing 129 changed files with 1,175 additions and 2,904 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ require (
github.com/bluekeyes/templatetree v0.1.0
github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae
github.com/die-net/lrucache v0.0.0-20181227122439-19a39ef22a11
github.com/google/go-github/v33 v33.0.0
github.com/google/go-github/v32 v32.0.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/palantir/go-baseapp v0.2.2
github.com/palantir/go-githubapp v0.6.0
github.com/palantir/go-githubapp v0.5.0
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.18.0
github.com/sergi/go-diff v1.1.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-github/v29 v29.0.2/go.mod h1:CHKiKKPHJ0REzfwc14QMklvtHwCveD0PxlMjLlzAM5E=
github.com/google/go-github/v29 v29.0.3 h1:IktKCTwU//aFHnpA+2SLIi7Oo9uhAzgsdZNbcAqhgdc=
github.com/google/go-github/v29 v29.0.3/go.mod h1:CHKiKKPHJ0REzfwc14QMklvtHwCveD0PxlMjLlzAM5E=
github.com/google/go-github/v33 v33.0.0 h1:qAf9yP0qc54ufQxzwv+u9H0tiVOnPJxo0lI/JXqw3ZM=
github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg=
github.com/google/go-github/v32 v32.0.0 h1:q74KVb22spUq0U5HqZ9VCYqQz8YRuOtL/39ZnfwO+NM=
github.com/google/go-github/v32 v32.0.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/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
Expand Down Expand Up @@ -169,8 +169,8 @@ github.com/palantir/go-baseapp v0.2.0 h1:EruWj7lBB7koSLuUjWRvNoIXdmowmLGj+rqiuoT
github.com/palantir/go-baseapp v0.2.0/go.mod h1:7rEjgYzWbHLLuY+mV2iJthxTddEc6aO+kFYsjDKNmEs=
github.com/palantir/go-baseapp v0.2.2 h1:BE5AJX6BHnC0a/98Vzy7VW+fMqFID91ofivGWUp1dqo=
github.com/palantir/go-baseapp v0.2.2/go.mod h1:pJTK0PJxhuIyoLAWHYH0svQJmWGeFDLZ9Xd9mLaOBtw=
github.com/palantir/go-githubapp v0.6.0 h1:FjjoD5Enh8DoEdW8ofZscKms7mHXs6gfNvdKlJ55TGY=
github.com/palantir/go-githubapp v0.6.0/go.mod h1:i8KvEdQ5AF0wZg6C+GFXBTSTpL1zAuObjiQbdo86Kbc=
github.com/palantir/go-githubapp v0.5.0 h1:mAdLgaaNV0zrqSv1q0zpJbKq65H92uIrAlSwRIRsGEE=
github.com/palantir/go-githubapp v0.5.0/go.mod h1:/Xm5h66uEBX24An2Ln8H6Rk44z8uwk4E6m4gNrPadjQ=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
2 changes: 1 addition & 1 deletion pull/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/shurcooL/githubv4"
Expand Down
2 changes: 1 addition & 1 deletion pull/github_membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pull/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/shurcooL/githubv4"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion server/handler/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion server/handler/check_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"encoding/json"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"

Expand Down
2 changes: 1 addition & 1 deletion server/handler/cross_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"

Expand Down
2 changes: 1 addition & 1 deletion server/handler/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/alexedwards/scs"
"github.com/bluekeyes/templatetree"
"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/pkg/errors"
"goji.io/pat"

Expand Down
4 changes: 2 additions & 2 deletions server/handler/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/http"
"strings"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -159,7 +159,7 @@ func (cf *ConfigFetcher) fetchConfigContents(ctx context.Context, client *github
}
if ok && isTooLargeError(rerr) {
// GetContents only supports file sizes up to 1 MB, DownloadContents supports files up to 100 MB (with an additional API call)
reader, _, err := client.Repositories.DownloadContents(ctx, owner, repo, path, opts)
reader, err := client.Repositories.DownloadContents(ctx, owner, repo, path, opts)
if err != nil {
return nil, errors.Wrapf(err, "failed to download content of %s/%s@%s/%s", owner, repo, ref, path)
}
Expand Down
2 changes: 1 addition & 1 deletion server/handler/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"encoding/json"
"fmt"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
"github.com/rs/zerolog"
Expand Down
2 changes: 1 addition & 1 deletion server/handler/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/alexedwards/scs"
"github.com/bluekeyes/hatpear"
"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/palantir/go-githubapp/oauth2"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion server/handler/pull_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"encoding/json"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"

Expand Down
2 changes: 1 addition & 1 deletion server/handler/pull_request_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"encoding/json"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"

Expand Down
2 changes: 1 addition & 1 deletion server/handler/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/google/go-github/v33/github"
"github.com/google/go-github/v32/github"
"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a34f2a

Please sign in to comment.