{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/test-infra/issues/9913","repository_url":"https://api.github.com/repos/kubernetes/test-infra","labels_url":"https://api.github.com/repos/kubernetes/test-infra/issues/9913/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/issues/9913/comments","events_url":"https://api.github.com/repos/kubernetes/test-infra/issues/9913/events","html_url":"https://github.com/kubernetes/test-infra/pull/9913","id":373709274,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NTc1OTM3","number":9913,"title":"prow/flagutil/github: Add TokenPathRequired","user":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"labels":[{"id":412127043,"node_id":"MDU6TGFiZWw0MTIxMjcwNDM=","url":"https://api.github.com/repos/kubernetes/test-infra/labels/area/prow","name":"area/prow","color":"0052cc","default":false},{"id":1039750822,"node_id":"MDU6TGFiZWwxMDM5NzUwODIy","url":"https://api.github.com/repos/kubernetes/test-infra/labels/area/prow/branchprotector","name":"area/prow/branchprotector","color":"0052cc","default":false},{"id":1039750344,"node_id":"MDU6TGFiZWwxMDM5NzUwMzQ0","url":"https://api.github.com/repos/kubernetes/test-infra/labels/area/prow/peribolos","name":"area/prow/peribolos","color":"0052cc","default":false},{"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":671132825,"node_id":"MDU6TGFiZWw2NzExMzI4MjU=","url":"https://api.github.com/repos/kubernetes/test-infra/labels/size/S","name":"size/S","color":"77bb00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-24T22:58:04Z","updated_at":"2018-10-24T23:08:18Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/9913","html_url":"https://github.com/kubernetes/test-infra/pull/9913","diff_url":"https://github.com/kubernetes/test-infra/pull/9913.diff","patch_url":"https://github.com/kubernetes/test-infra/pull/9913.patch"},"body":"Before 8e5893b5 (#9503), only `branchprotector` and `peribolos` explicitly required non-empty GitHub tokens.  And @krzyzacy has [a plank use-case which doesn't need a GitHub token][1] (see also [the plank code calling `secretAgent.Start` if and only if `TokenPath` is empty][2]).  This pull request adds a new `TokenPathRequired` which commands can use to explicitly opt into the check.  And it adds a sentinal value so folks using the deprecated `--github-token-file=` to explicitly clear the setting will still be respected.\n\n[1]: https://github.com/kubernetes/test-infra/pull/9503/#discussion_r227979933\n[2]: https://github.com/kubernetes/test-infra/blob/761277f59c4568298cd696a2a20339879d235566/prow/cmd/plank/main.go#L104-L108"},"comment":{"url":"https://api.github.com/repos/kubernetes/test-infra/issues/comments/432858284","html_url":"https://github.com/kubernetes/test-infra/pull/9913#issuecomment-432858284","issue_url":"https://api.github.com/repos/kubernetes/test-infra/issues/9913","id":432858284,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjg1ODI4NA==","user":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T23:08:18Z","updated_at":"2018-10-24T23:08:18Z","author_association":"CONTRIBUTOR","body":"[From][1] the previous pull:\r\n\r\n> Or maybe a global switch like `--github`, default to true, and we can flip that to false?\r\n\r\nThat's not backwards compatible with callers who were using the pre-#9503 interfaces.  But it does make more sense (even [the `Git` client needs the token][2]).  Is there a way we can close that?  Maybe allow folks to set the token to an empty string without complaining, but then error out complaining about the empty string if they try to instantiate a client?\r\n\r\n[1]: https://github.com/kubernetes/test-infra/pull/9503#discussion_r227984550\r\n[2]: https://github.com/kubernetes/test-infra/blob/761277f59c4568298cd696a2a20339879d235566/prow/flagutil/github.go#L100-L109"}}
{"actor":{"display_login":"wking"}}