File tree 4 files changed +13
-11
lines changed
4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ require (
22
22
github.com/gobuffalo/here v0.6.0
23
23
github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556
24
24
github.com/gofrs/uuid v4.0.0+incompatible // indirect
25
- github.com/google/go-github/v35 v35 .2.0
25
+ github.com/google/go-github/v39 v39 .2.0
26
26
github.com/gorilla/mux v1.7.4 // indirect
27
27
github.com/hashicorp/go-multierror v1.1.0
28
28
github.com/jackc/pgconn v1.8.0
@@ -48,6 +48,7 @@ require (
48
48
go.uber.org/atomic v1.6.0
49
49
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
50
50
golang.org/x/net v0.0.0-20211013171255-e13a2654a71e // indirect
51
+ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
51
52
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c // indirect
52
53
golang.org/x/tools v0.1.5
53
54
google.golang.org/api v0.51.0
Original file line number Diff line number Diff line change @@ -515,10 +515,11 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
515
515
github.com/google/go-cmp v0.5.5 /go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE =
516
516
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ =
517
517
github.com/google/go-cmp v0.5.6 /go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE =
518
- github.com/google/go-github/v35 v35.2.0 h1:s/soW8jauhjUC3rh8JI0FePuocj0DEI9DNBg/bVplE8 =
519
- github.com/google/go-github/v35 v35.2.0 /go.mod h1:s0515YVTI+IMrDoy9Y4pHt9ShGpzHvHO8rZ7L7acgvs =
520
- github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk =
518
+ github.com/google/go-github/v39 v39.2.0 h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ =
519
+ github.com/google/go-github/v39 v39.2.0 /go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE =
521
520
github.com/google/go-querystring v1.0.0 /go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck =
521
+ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8 =
522
+ github.com/google/go-querystring v1.1.0 /go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU =
522
523
github.com/google/gofuzz v1.0.0 /go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg =
523
524
github.com/google/gofuzz v1.1.0 /go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg =
524
525
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no =
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package github
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "golang.org/x/oauth2"
6
7
"io"
7
8
"io/ioutil"
8
9
"net/http"
@@ -12,7 +13,7 @@ import (
12
13
"strings"
13
14
14
15
"github.com/golang-migrate/migrate/v4/source"
15
- "github.com/google/go-github/v35 /github"
16
+ "github.com/google/go-github/v39 /github"
16
17
)
17
18
18
19
func init () {
@@ -54,12 +55,11 @@ func (g *Github) Open(url string) (source.Driver, error) {
54
55
if ! ok {
55
56
return nil , ErrNoUserInfo
56
57
}
58
+ ts := oauth2 .StaticTokenSource (
59
+ & oauth2.Token {AccessToken : password },
60
+ )
61
+ client = oauth2 .NewClient (context .Background (), ts )
57
62
58
- tr := & github.BasicAuthTransport {
59
- Username : u .User .Username (),
60
- Password : password ,
61
- }
62
- client = tr .Client ()
63
63
}
64
64
65
65
gn := & Github {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
11
11
"github.com/golang-migrate/migrate/v4/source"
12
12
gh "github.com/golang-migrate/migrate/v4/source/github"
13
13
14
- "github.com/google/go-github/v35 /github"
14
+ "github.com/google/go-github/v39 /github"
15
15
)
16
16
17
17
func init () {
You can’t perform that action at this time.
0 commit comments