File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ require (
99
1010require (
1111 github.com/cli/safeexec v1.0.1 // indirect
12+ github.com/gofri/go-github-ratelimit v1.1.0 // indirect
1213 github.com/google/go-querystring v1.1.0 // indirect
1314 github.com/kr/text v0.2.0 // indirect
1415 github.com/samber/lo v1.47.0 // indirect
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ github.com/cli/safeexec v1.0.1/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5
77github.com/creack/pty v1.1.9 /go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E =
88github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
99github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
10+ github.com/gofri/go-github-ratelimit v1.1.0 h1:ijQ2bcv5pjZXNil5FiwglCg8wc9s8EgjTmNkqjw8nuk =
11+ github.com/gofri/go-github-ratelimit v1.1.0 /go.mod h1:OnCi5gV+hAG/LMR7llGhU7yHt44se9sYgKPnafoL7RY =
1012github.com/google/go-cmp v0.5.2 /go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE =
1113github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI =
1214github.com/google/go-cmp v0.6.0 /go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY =
Original file line number Diff line number Diff line change 88
99 "github.com/cli/go-gh/v2/pkg/auth"
1010 "github.com/cli/go-gh/v2/pkg/repository"
11+ "github.com/gofri/go-github-ratelimit/github_ratelimit"
1112 "github.com/google/go-github/v67/github"
1213 "github.com/prefapp/gh-commit/git"
1314)
@@ -32,7 +33,12 @@ func main() {
3233 host , _ := auth .DefaultHost ()
3334 token , _ := auth .TokenForHost (host )
3435
35- client := github .NewClient (nil ).WithAuthToken (token )
36+ rateLimiter , err := github_ratelimit .NewRateLimitWaiterClient (nil )
37+ if err != nil {
38+ panic (err )
39+ }
40+
41+ client := github .NewClient (rateLimiter ).WithAuthToken (token )
3642
3743 parsedRepo , err := repository .Parse (* repo )
3844
You can’t perform that action at this time.
0 commit comments