{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/ci-operator/pulls/comments/208615497","pull_request_review_id":144460596,"id":208615497,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODYxNTQ5Nw==","diff_hunk":"@@ -534,6 +537,31 @@ func (o *options) initializeNamespace() error {\n \t\tbreak\n \t}\n \n+\tif o.givePrAuthorAccessToNamespace {\n+\t\t// Generate rolebinding for the PR Author.\n+\t\tif len(o.jobSpec.Refs.Pulls) == 1 {\n+\t\t\trbacClient, err := rbacclientset.NewForConfig(o.clusterConfig)\n+\t\t\tif err != nil {\n+\t\t\t\treturn fmt.Errorf(\"could not get RBAC client for cluster config: %v\", err)\n+\t\t\t}\n+\n+\t\t\tlog.Printf(\"Creating rolebinding for user %s in namespace %s\", o.jobSpec.Refs.Pulls[0].Author, o.namespace)\n+\t\t\tif _, err := rbacClient.RoleBindings(o.namespace).Create(&rbacapi.RoleBinding{\n+\t\t\t\tObjectMeta: meta.ObjectMeta{\n+\t\t\t\t\tName:      \"namespace-viewer\",","path":"cmd/ci-operator/main.go","position":32,"original_position":32,"commit_id":"d6ac720c40ea287b07d89def7eca23d2d1907456","original_commit_id":"d6ac720c40ea287b07d89def7eca23d2d1907456","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":"I thought we wanted `admin`? @gabemontero what did you think you would need?","created_at":"2018-08-08T14:58:43Z","updated_at":"2018-08-08T14:58:47Z","html_url":"https://github.com/openshift/ci-operator/pull/80#discussion_r208615497","pull_request_url":"https://api.github.com/repos/openshift/ci-operator/pulls/80","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/comments/208615497"},"html":{"href":"https://github.com/openshift/ci-operator/pull/80#discussion_r208615497"},"pull_request":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/ci-operator/pulls/80","id":207006089,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MDA2MDg5","html_url":"https://github.com/openshift/ci-operator/pull/80","diff_url":"https://github.com/openshift/ci-operator/pull/80.diff","patch_url":"https://github.com/openshift/ci-operator/pull/80.patch","issue_url":"https://api.github.com/repos/openshift/ci-operator/issues/80","number":80,"state":"open","locked":false,"title":"Create rolebinding for the PR author.","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":" Create rolebinding for the PR author to give him access in the created temporary namespace.\r\ncloses #65 ","created_at":"2018-08-08T13:23:13Z","updated_at":"2018-08-08T14:58:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef6e45116cb3133d1921158d30f9fb0ced0e11b2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":926768528,"node_id":"MDU6TGFiZWw5MjY3Njg1Mjg=","url":"https://api.github.com/repos/openshift/ci-operator/labels/size/S","name":"size/S","color":"77bb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/ci-operator/pulls/80/commits","review_comments_url":"https://api.github.com/repos/openshift/ci-operator/pulls/80/comments","review_comment_url":"https://api.github.com/repos/openshift/ci-operator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/ci-operator/issues/80/comments","statuses_url":"https://api.github.com/repos/openshift/ci-operator/statuses/d6ac720c40ea287b07d89def7eca23d2d1907456","head":{"label":"droslean:dptp-79","ref":"dptp-79","sha":"d6ac720c40ea287b07d89def7eca23d2d1907456","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":143710840,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3MTA4NDA=","name":"ci-operator","full_name":"droslean/ci-operator","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/ci-operator","description":null,"fork":true,"url":"https://api.github.com/repos/droslean/ci-operator","forks_url":"https://api.github.com/repos/droslean/ci-operator/forks","keys_url":"https://api.github.com/repos/droslean/ci-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/droslean/ci-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/droslean/ci-operator/teams","hooks_url":"https://api.github.com/repos/droslean/ci-operator/hooks","issue_events_url":"https://api.github.com/repos/droslean/ci-operator/issues/events{/number}","events_url":"https://api.github.com/repos/droslean/ci-operator/events","assignees_url":"https://api.github.com/repos/droslean/ci-operator/assignees{/user}","branches_url":"https://api.github.com/repos/droslean/ci-operator/branches{/branch}","tags_url":"https://api.github.com/repos/droslean/ci-operator/tags","blobs_url":"https://api.github.com/repos/droslean/ci-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/droslean/ci-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/droslean/ci-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/droslean/ci-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/droslean/ci-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/droslean/ci-operator/languages","stargazers_url":"https://api.github.com/repos/droslean/ci-operator/stargazers","contributors_url":"https://api.github.com/repos/droslean/ci-operator/contributors","subscribers_url":"https://api.github.com/repos/droslean/ci-operator/subscribers","subscription_url":"https://api.github.com/repos/droslean/ci-operator/subscription","commits_url":"https://api.github.com/repos/droslean/ci-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/droslean/ci-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/droslean/ci-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/droslean/ci-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/droslean/ci-operator/contents/{+path}","compare_url":"https://api.github.com/repos/droslean/ci-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/droslean/ci-operator/merges","archive_url":"https://api.github.com/repos/droslean/ci-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/droslean/ci-operator/downloads","issues_url":"https://api.github.com/repos/droslean/ci-operator/issues{/number}","pulls_url":"https://api.github.com/repos/droslean/ci-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/droslean/ci-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/droslean/ci-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/droslean/ci-operator/labels{/name}","releases_url":"https://api.github.com/repos/droslean/ci-operator/releases{/id}","deployments_url":"https://api.github.com/repos/droslean/ci-operator/deployments","created_at":"2018-08-06T10:07:21Z","updated_at":"2018-08-06T10:07:23Z","pushed_at":"2018-08-08T14:15:43Z","git_url":"git://github.com/droslean/ci-operator.git","ssh_url":"git@github.com:droslean/ci-operator.git","clone_url":"https://github.com/droslean/ci-operator.git","svn_url":"https://github.com/droslean/ci-operator","homepage":null,"size":12980,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"e5bead6de38fe4aaeb8d8f989c51db339cc1df25","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":119440554,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk0NDA1NTQ=","name":"ci-operator","full_name":"openshift/ci-operator","owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/ci-operator","description":null,"fork":false,"url":"https://api.github.com/repos/openshift/ci-operator","forks_url":"https://api.github.com/repos/openshift/ci-operator/forks","keys_url":"https://api.github.com/repos/openshift/ci-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/ci-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/ci-operator/teams","hooks_url":"https://api.github.com/repos/openshift/ci-operator/hooks","issue_events_url":"https://api.github.com/repos/openshift/ci-operator/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/ci-operator/events","assignees_url":"https://api.github.com/repos/openshift/ci-operator/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/ci-operator/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/ci-operator/tags","blobs_url":"https://api.github.com/repos/openshift/ci-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/ci-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/ci-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/ci-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/ci-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/ci-operator/languages","stargazers_url":"https://api.github.com/repos/openshift/ci-operator/stargazers","contributors_url":"https://api.github.com/repos/openshift/ci-operator/contributors","subscribers_url":"https://api.github.com/repos/openshift/ci-operator/subscribers","subscription_url":"https://api.github.com/repos/openshift/ci-operator/subscription","commits_url":"https://api.github.com/repos/openshift/ci-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/ci-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/ci-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/ci-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/ci-operator/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/ci-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/ci-operator/merges","archive_url":"https://api.github.com/repos/openshift/ci-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/ci-operator/downloads","issues_url":"https://api.github.com/repos/openshift/ci-operator/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/ci-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/ci-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/ci-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/ci-operator/labels{/name}","releases_url":"https://api.github.com/repos/openshift/ci-operator/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/ci-operator/deployments","created_at":"2018-01-29T20:55:49Z","updated_at":"2018-08-03T16:48:02Z","pushed_at":"2018-08-08T14:15:44Z","git_url":"git://github.com/openshift/ci-operator.git","ssh_url":"git@github.com:openshift/ci-operator.git","clone_url":"https://github.com/openshift/ci-operator.git","svn_url":"https://github.com/openshift/ci-operator","homepage":null,"size":12989,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":11,"open_issues":19,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/80"},"html":{"href":"https://github.com/openshift/ci-operator/pull/80"},"issue":{"href":"https://api.github.com/repos/openshift/ci-operator/issues/80"},"comments":{"href":"https://api.github.com/repos/openshift/ci-operator/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/ci-operator/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/ci-operator/statuses/d6ac720c40ea287b07d89def7eca23d2d1907456"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"stevekuznetsov"}}