{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments/207591936","pull_request_review_id":143231383,"id":207591936,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzU5MTkzNg==","diff_hunk":"@@ -185,18 +190,36 @@ func (c *Client) Throttle(hourlyTokens, burst int) {\n \tc.throttle.throttle = throttle\n }\n \n+// RoundTrip is an implementation for net/http RoundTripper interface.\n+// Its being used to refresh the token from a token source.\n+func (ct *cacherTransport) RoundTrip(req *http.Request) (resp *http.Response, err error) {\n+\t_, err = ct.Base.Source.Token()\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\t// ref: https://godoc.org/net/http#Transport.RoundTrip\n+\tresp, err = ct.Base.RoundTrip(req)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\t_, err = ct.Base.Source.Token()\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\treturn resp, nil\n+}\n+\n // NewClient creates a new fully operational GitHub client.\n // 'getToken' is a generator for the GitHub access token to use.\n // 'bases' is a variadic slice of endpoints to use in order of preference.\n //   An endpoint is used when all preceding endpoints have returned a conn err.\n //   This should be used when using the ghproxy GitHub proxy cache to allow\n //   this client to bypass the cache if it is temporarily unavailable.\n-func NewClient(getToken func() []byte, bases ...string) *Client {\n+func NewClient(getToken func() []byte, tokenSource oauth2.TokenSource, bases ...string) *Client {","path":"prow/github/client.go","position":42,"original_position":42,"commit_id":"51328385cd21c90d282d545da5522f5b821f99bb","original_commit_id":"51328385cd21c90d282d545da5522f5b821f99bb","user":{"login":"stevekuznetsov","id":7328370,"node_id":"MDQ6VXNlcjczMjgzNzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7328370?v=4","gravatar_id":"","url":"https://api.github.com/users/stevekuznetsov","html_url":"https://github.com/stevekuznetsov","followers_url":"https://api.github.com/users/stevekuznetsov/followers","following_url":"https://api.github.com/users/stevekuznetsov/following{/other_user}","gists_url":"https://api.github.com/users/stevekuznetsov/gists{/gist_id}","starred_url":"https://api.github.com/users/stevekuznetsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevekuznetsov/subscriptions","organizations_url":"https://api.github.com/users/stevekuznetsov/orgs","repos_url":"https://api.github.com/users/stevekuznetsov/repos","events_url":"https://api.github.com/users/stevekuznetsov/events{/privacy}","received_events_url":"https://api.github.com/users/stevekuznetsov/received_events","type":"User","site_admin":false},"body":"This signature is a little odd, we shouldn't make it possible for someone to pass a separate token for the graphql bits than the other one -- maybe just take the SecretAgent and use it's methods inside of the constructor","created_at":"2018-08-03T16:00:14Z","updated_at":"2018-08-03T16:00:18Z","html_url":"https://github.com/kubernetes/test-infra/pull/8932#discussion_r207591936","pull_request_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments/207591936"},"html":{"href":"https://github.com/kubernetes/test-infra/pull/8932#discussion_r207591936"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932","id":206047598,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MDQ3NTk4","html_url":"https://github.com/kubernetes/test-infra/pull/8932","diff_url":"https://github.com/kubernetes/test-infra/pull/8932.diff","patch_url":"https://github.com/kubernetes/test-infra/pull/8932.patch","issue_url":"https://api.github.com/repos/kubernetes/test-infra/issues/8932","number":8932,"state":"open","locked":false,"title":"Dynamic reload token in github GraphQL client.","user":{"login":"droslean","id":8650912,"node_id":"MDQ6VXNlcjg2NTA5MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8650912?v=4","gravatar_id":"","url":"https://api.github.com/users/droslean","html_url":"https://github.com/droslean","followers_url":"https://api.github.com/users/droslean/followers","following_url":"https://api.github.com/users/droslean/following{/other_user}","gists_url":"https://api.github.com/users/droslean/gists{/gist_id}","starred_url":"https://api.github.com/users/droslean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droslean/subscriptions","organizations_url":"https://api.github.com/users/droslean/orgs","repos_url":"https://api.github.com/users/droslean/repos","events_url":"https://api.github.com/users/droslean/events{/privacy}","received_events_url":"https://api.github.com/users/droslean/received_events","type":"User","site_admin":false},"body":"closes #8702 ","created_at":"2018-08-03T14:29:05Z","updated_at":"2018-08-03T16:00:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af63822e58be766930a5b1d78c1cfa7ddab5dd03","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cblecker","id":1431969,"node_id":"MDQ6VXNlcjE0MzE5Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/1431969?v=4","gravatar_id":"","url":"https://api.github.com/users/cblecker","html_url":"https://github.com/cblecker","followers_url":"https://api.github.com/users/cblecker/followers","following_url":"https://api.github.com/users/cblecker/following{/other_user}","gists_url":"https://api.github.com/users/cblecker/gists{/gist_id}","starred_url":"https://api.github.com/users/cblecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cblecker/subscriptions","organizations_url":"https://api.github.com/users/cblecker/orgs","repos_url":"https://api.github.com/users/cblecker/repos","events_url":"https://api.github.com/users/cblecker/events{/privacy}","received_events_url":"https://api.github.com/users/cblecker/received_events","type":"User","site_admin":false},{"login":"cjwagner","id":5334145,"node_id":"MDQ6VXNlcjUzMzQxNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/5334145?v=4","gravatar_id":"","url":"https://api.github.com/users/cjwagner","html_url":"https://github.com/cjwagner","followers_url":"https://api.github.com/users/cjwagner/followers","following_url":"https://api.github.com/users/cjwagner/following{/other_user}","gists_url":"https://api.github.com/users/cjwagner/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwagner/subscriptions","organizations_url":"https://api.github.com/users/cjwagner/orgs","repos_url":"https://api.github.com/users/cjwagner/repos","events_url":"https://api.github.com/users/cjwagner/events{/privacy}","received_events_url":"https://api.github.com/users/cjwagner/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":484580953,"node_id":"MDU6TGFiZWw0ODQ1ODA5NTM=","url":"https://api.github.com/repos/kubernetes/test-infra/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":671133125,"node_id":"MDU6TGFiZWw2NzExMzMxMjU=","url":"https://api.github.com/repos/kubernetes/test-infra/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932/commits","review_comments_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932/comments","review_comment_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/issues/8932/comments","statuses_url":"https://api.github.com/repos/kubernetes/test-infra/statuses/51328385cd21c90d282d545da5522f5b821f99bb","head":{"label":"droslean:issue-8702","ref":"issue-8702","sha":"51328385cd21c90d282d545da5522f5b821f99bb","user":{"login":"droslean","id":8650912,"node_id":"MDQ6VXNlcjg2NTA5MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8650912?v=4","gravatar_id":"","url":"https://api.github.com/users/droslean","html_url":"https://github.com/droslean","followers_url":"https://api.github.com/users/droslean/followers","following_url":"https://api.github.com/users/droslean/following{/other_user}","gists_url":"https://api.github.com/users/droslean/gists{/gist_id}","starred_url":"https://api.github.com/users/droslean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droslean/subscriptions","organizations_url":"https://api.github.com/users/droslean/orgs","repos_url":"https://api.github.com/users/droslean/repos","events_url":"https://api.github.com/users/droslean/events{/privacy}","received_events_url":"https://api.github.com/users/droslean/received_events","type":"User","site_admin":false},"repo":{"id":139737783,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk3Mzc3ODM=","name":"test-infra","full_name":"droslean/test-infra","owner":{"login":"droslean","id":8650912,"node_id":"MDQ6VXNlcjg2NTA5MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8650912?v=4","gravatar_id":"","url":"https://api.github.com/users/droslean","html_url":"https://github.com/droslean","followers_url":"https://api.github.com/users/droslean/followers","following_url":"https://api.github.com/users/droslean/following{/other_user}","gists_url":"https://api.github.com/users/droslean/gists{/gist_id}","starred_url":"https://api.github.com/users/droslean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droslean/subscriptions","organizations_url":"https://api.github.com/users/droslean/orgs","repos_url":"https://api.github.com/users/droslean/repos","events_url":"https://api.github.com/users/droslean/events{/privacy}","received_events_url":"https://api.github.com/users/droslean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/droslean/test-infra","description":"Test infrastructure for the Kubernetes project.","fork":true,"url":"https://api.github.com/repos/droslean/test-infra","forks_url":"https://api.github.com/repos/droslean/test-infra/forks","keys_url":"https://api.github.com/repos/droslean/test-infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/droslean/test-infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/droslean/test-infra/teams","hooks_url":"https://api.github.com/repos/droslean/test-infra/hooks","issue_events_url":"https://api.github.com/repos/droslean/test-infra/issues/events{/number}","events_url":"https://api.github.com/repos/droslean/test-infra/events","assignees_url":"https://api.github.com/repos/droslean/test-infra/assignees{/user}","branches_url":"https://api.github.com/repos/droslean/test-infra/branches{/branch}","tags_url":"https://api.github.com/repos/droslean/test-infra/tags","blobs_url":"https://api.github.com/repos/droslean/test-infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/droslean/test-infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/droslean/test-infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/droslean/test-infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/droslean/test-infra/statuses/{sha}","languages_url":"https://api.github.com/repos/droslean/test-infra/languages","stargazers_url":"https://api.github.com/repos/droslean/test-infra/stargazers","contributors_url":"https://api.github.com/repos/droslean/test-infra/contributors","subscribers_url":"https://api.github.com/repos/droslean/test-infra/subscribers","subscription_url":"https://api.github.com/repos/droslean/test-infra/subscription","commits_url":"https://api.github.com/repos/droslean/test-infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/droslean/test-infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/droslean/test-infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/droslean/test-infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/droslean/test-infra/contents/{+path}","compare_url":"https://api.github.com/repos/droslean/test-infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/droslean/test-infra/merges","archive_url":"https://api.github.com/repos/droslean/test-infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/droslean/test-infra/downloads","issues_url":"https://api.github.com/repos/droslean/test-infra/issues{/number}","pulls_url":"https://api.github.com/repos/droslean/test-infra/pulls{/number}","milestones_url":"https://api.github.com/repos/droslean/test-infra/milestones{/number}","notifications_url":"https://api.github.com/repos/droslean/test-infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/droslean/test-infra/labels{/name}","releases_url":"https://api.github.com/repos/droslean/test-infra/releases{/id}","deployments_url":"https://api.github.com/repos/droslean/test-infra/deployments","created_at":"2018-07-04T15:13:58Z","updated_at":"2018-07-30T19:05:35Z","pushed_at":"2018-08-03T14:38:12Z","git_url":"git://github.com/droslean/test-infra.git","ssh_url":"git@github.com:droslean/test-infra.git","clone_url":"https://github.com/droslean/test-infra.git","svn_url":"https://github.com/droslean/test-infra","homepage":null,"size":58044,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"f331f238640adbbb051077ddc95ad4d9ea7b938b","user":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":57333709,"node_id":"MDEwOlJlcG9zaXRvcnk1NzMzMzcwOQ==","name":"test-infra","full_name":"kubernetes/test-infra","owner":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/test-infra","description":"Test infrastructure for the Kubernetes project.","fork":false,"url":"https://api.github.com/repos/kubernetes/test-infra","forks_url":"https://api.github.com/repos/kubernetes/test-infra/forks","keys_url":"https://api.github.com/repos/kubernetes/test-infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/test-infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/test-infra/teams","hooks_url":"https://api.github.com/repos/kubernetes/test-infra/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/test-infra/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/test-infra/events","assignees_url":"https://api.github.com/repos/kubernetes/test-infra/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/test-infra/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/test-infra/tags","blobs_url":"https://api.github.com/repos/kubernetes/test-infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/test-infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/test-infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/test-infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/test-infra/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/test-infra/languages","stargazers_url":"https://api.github.com/repos/kubernetes/test-infra/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/test-infra/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/test-infra/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/test-infra/subscription","commits_url":"https://api.github.com/repos/kubernetes/test-infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/test-infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/test-infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/test-infra/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/test-infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/test-infra/merges","archive_url":"https://api.github.com/repos/kubernetes/test-infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/test-infra/downloads","issues_url":"https://api.github.com/repos/kubernetes/test-infra/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/test-infra/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/test-infra/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/test-infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/test-infra/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/test-infra/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/test-infra/deployments","created_at":"2016-04-28T21:05:35Z","updated_at":"2018-08-03T09:54:22Z","pushed_at":"2018-08-03T14:56:55Z","git_url":"git://github.com/kubernetes/test-infra.git","ssh_url":"git@github.com:kubernetes/test-infra.git","clone_url":"https://github.com/kubernetes/test-infra.git","svn_url":"https://github.com/kubernetes/test-infra","homepage":null,"size":58813,"stargazers_count":493,"watchers_count":493,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":518,"mirror_url":null,"archived":false,"open_issues_count":326,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":518,"open_issues":326,"watchers":493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932"},"html":{"href":"https://github.com/kubernetes/test-infra/pull/8932"},"issue":{"href":"https://api.github.com/repos/kubernetes/test-infra/issues/8932"},"comments":{"href":"https://api.github.com/repos/kubernetes/test-infra/issues/8932/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8932/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/test-infra/statuses/51328385cd21c90d282d545da5522f5b821f99bb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stevekuznetsov"}}