-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: echox, go-github, gqlgen, oidc and update to breaking changes (#…
…120) * deps: upgrade echox and update for breaking change, precommit Signed-off-by: Sarah Funkhouser <[email protected]> * go mod tidy Signed-off-by: Sarah Funkhouser <[email protected]> * other upgrades Signed-off-by: Sarah Funkhouser <[email protected]> * update deprecated functions Signed-off-by: Sarah Funkhouser <[email protected]> --------- Signed-off-by: Sarah Funkhouser <[email protected]>
- Loading branch information
1 parent
25bb074
commit eea45ec
Showing
14 changed files
with
63 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import ( | |
"net/http" | ||
"net/url" | ||
|
||
"github.com/google/go-github/v67/github" | ||
"github.com/google/go-github/v68/github" | ||
) | ||
|
||
// ClientConfig holds the configuration for the GitHub client | ||
|
@@ -100,8 +100,8 @@ func (u *UsersMock) Get(context.Context, string) (*github.User, *github.Response | |
resp := &http.Response{StatusCode: http.StatusOK} | ||
|
||
return &github.User{ | ||
Login: github.String("antman"), | ||
ID: github.Int64(1), | ||
Login: github.Ptr("antman"), | ||
ID: github.Ptr(int64(1)), | ||
}, &github.Response{Response: resp}, nil | ||
} | ||
|
||
|
@@ -111,12 +111,12 @@ func (u *UsersMock) ListEmails(ctx context.Context, opts *github.ListOptions) ([ | |
|
||
return []*github.UserEmail{ | ||
{ | ||
Email: github.String("[email protected]"), | ||
Primary: github.Bool(true), | ||
Email: github.Ptr("[email protected]"), | ||
Primary: github.Ptr(true), | ||
}, | ||
{ | ||
Email: github.String("[email protected]"), | ||
Primary: github.Bool(false), | ||
Email: github.Ptr("[email protected]"), | ||
Primary: github.Ptr(false), | ||
}, | ||
}, &github.Response{Response: resp}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
|
||
oauth2Login "github.com/theopenlane/iam/providers/oauth2" | ||
|
||
"github.com/google/go-github/v67/github" | ||
"github.com/google/go-github/v68/github" | ||
"github.com/stretchr/testify/assert" | ||
"golang.org/x/oauth2" | ||
) | ||
|
@@ -27,9 +27,9 @@ func TestGithubHandler(t *testing.T) { | |
emailJSONData := `[{"primary": true, "email": "[email protected]"}, {"primary": false, "email": "[email protected]"}]` | ||
|
||
expectedUser := &github.User{ | ||
ID: github.Int64(917408), | ||
Name: github.String("Sarah Funkytown"), | ||
Email: github.String("[email protected]"), | ||
ID: github.Ptr(int64(917408)), | ||
Name: github.Ptr("Sarah Funkytown"), | ||
Email: github.Ptr("[email protected]"), | ||
} | ||
|
||
proxyClient, server := newGithubTestServer("", jsonData, emailJSONData) | ||
|
@@ -122,9 +122,9 @@ func TestGithubEnterprise(t *testing.T) { | |
jsonData := `{"id": 917408, "name": "Sarah Funkytown"}` | ||
emailJSONData := `[{"primary": true, "email": "[email protected]"}, {"primary": false, "email": "[email protected]"}]` | ||
expectedUser := &github.User{ | ||
ID: github.Int64(917408), | ||
Name: github.String("Sarah Funkytown"), | ||
Email: github.String("[email protected]"), | ||
ID: github.Ptr(int64(917408)), | ||
Name: github.Ptr("Sarah Funkytown"), | ||
Email: github.Ptr("[email protected]"), | ||
} | ||
|
||
proxyClient, server := newGithubTestServer("/api/v3", jsonData, emailJSONData) | ||
|
@@ -160,7 +160,7 @@ func TestGithubEnterprise(t *testing.T) { | |
} | ||
|
||
func TestValidateResponse(t *testing.T) { | ||
validUser := &github.User{ID: github.Int64(123)} | ||
validUser := &github.User{ID: github.Ptr(int64(123))} | ||
validResponse := &github.Response{Response: &http.Response{StatusCode: 200}} | ||
invalidResponse := &github.Response{Response: &http.Response{StatusCode: 500}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters