Created
May 8, 2017 22:16
-
-
Save sminnee/7a7a7352689d7a29738738c022d65ad6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/main.go b/main.go | |
| index 81cafd4..f83a559 100644 | |
| --- a/main.go | |
| +++ b/main.go | |
| @@ -14,6 +14,7 @@ import ( | |
| "strings" | |
| "sync" | |
| "time" | |
| + "context" | |
| ) | |
| const ( | |
| @@ -111,7 +112,7 @@ func trawlGitHub(conf *Config) <-chan *PullRequest { | |
| continue | |
| } | |
| logrus.Debugf("expanding wildcard on %s", repoName) | |
| - allRepos, _, err := client.Repositories.List(repoParts[0], nil) | |
| + allRepos, _, err := client.Repositories.List(context.Background(), repoParts[0], nil) | |
| if err != nil { | |
| logrus.Error(err) | |
| continue | |
| @@ -150,7 +151,7 @@ func trawlGitHub(conf *Config) <-chan *PullRequest { | |
| } | |
| // get the pull requests | |
| - pullRequests, resp, err := client.PullRequests.List(parts[0], parts[1], options) | |
| + pullRequests, resp, err := client.PullRequests.List(context.Background(), parts[0], parts[1], options) | |
| if err != nil { | |
| logrus.Errorf("While fetching PRs from GitHub (%s/%s): %s", parts[0], parts[1], err) | |
| return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment