{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/comments/40491701","id":40491701,"diff_hunk":"@@ -183,6 +187,17 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, final Build\n         if (intendToMerge && canMerge) {\n             logger.println(\"Merging the pull request\");\n \n+\t\t\ttry {\n+\t\t\t\tField ghRootField = GHIssue.class.getDeclaredField(\"root\");\n+\t\t\t\tghRootField.setAccessible(true);\n+\t\t\t\tObject ghRoot = ghRootField.get(pr);\n+\t\t\t\tMethod anonMethod = GitHub.class.getMethod(\"isAnonymous\");\n+\t\t\t\tanonMethod.setAccessible(true);\n+\t\t\t\tBoolean isAnonymous = (Boolean) (anonMethod.invoke(ghRoot));\n+\t\t\t\tlogger.println(\"Merging PR[\" + pr + \"] is anonymous: \" + isAnonymous);","path":"src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequestMerge.java","position":44,"original_position":44,"commit_id":"f4f93158b8e69eca046d6039839e3d76d756fd9c","original_commit_id":"f4f93158b8e69eca046d6039839e3d76d756fd9c","user":{"login":"arcivanov","id":5355666,"avatar_url":"https://avatars.githubusercontent.com/u/5355666?v=3","gravatar_id":"","url":"https://api.github.com/users/arcivanov","html_url":"https://github.com/arcivanov","followers_url":"https://api.github.com/users/arcivanov/followers","following_url":"https://api.github.com/users/arcivanov/following{/other_user}","gists_url":"https://api.github.com/users/arcivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/arcivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcivanov/subscriptions","organizations_url":"https://api.github.com/users/arcivanov/orgs","repos_url":"https://api.github.com/users/arcivanov/repos","events_url":"https://api.github.com/users/arcivanov/events{/privacy}","received_events_url":"https://api.github.com/users/arcivanov/received_events","type":"User","site_admin":false},"body":"@DavidTanner So this ends up printing: \r\n`2015-09-26 08:31:23.161: Merging PR[org.kohsuke.github.GHPullRequest@30276161] is anonymous: true`\r\n\r\nSomewhere, somehow, we're picking an anonymous GitHub for PR.","created_at":"2015-09-26T08:43:43Z","updated_at":"2015-09-26T08:43:43Z","html_url":"https://github.com/jenkinsci/ghprb-plugin/pull/202#discussion_r40491701","pull_request_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/comments/40491701"},"html":{"href":"https://github.com/jenkinsci/ghprb-plugin/pull/202#discussion_r40491701"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202","id":46076627,"html_url":"https://github.com/jenkinsci/ghprb-plugin/pull/202","diff_url":"https://github.com/jenkinsci/ghprb-plugin/pull/202.diff","patch_url":"https://github.com/jenkinsci/ghprb-plugin/pull/202.patch","issue_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/202","number":202,"state":"open","locked":false,"title":"Fix issues with authentication for hooks.","user":{"login":"DavidTanner","id":368889,"avatar_url":"https://avatars.githubusercontent.com/u/368889?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidTanner","html_url":"https://github.com/DavidTanner","followers_url":"https://api.github.com/users/DavidTanner/followers","following_url":"https://api.github.com/users/DavidTanner/following{/other_user}","gists_url":"https://api.github.com/users/DavidTanner/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidTanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidTanner/subscriptions","organizations_url":"https://api.github.com/users/DavidTanner/orgs","repos_url":"https://api.github.com/users/DavidTanner/repos","events_url":"https://api.github.com/users/DavidTanner/events{/privacy}","received_events_url":"https://api.github.com/users/DavidTanner/received_events","type":"User","site_admin":false},"body":"Change should address #199 and #198.\r\n\r\nEvents will be parsed once to get the repo, then again before passing down to any relevant jobs.  This allows for authenticating as needed for relevant jobs.","created_at":"2015-09-26T06:28:38Z","updated_at":"2015-09-26T08:43:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eca7f27f6876d1fb53fad17db4245d9d67a11e0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/202/comments","statuses_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/statuses/f4f93158b8e69eca046d6039839e3d76d756fd9c","head":{"label":"jenkinsci:webhook","ref":"webhook","sha":"f4f93158b8e69eca046d6039839e3d76d756fd9c","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":5672873,"name":"ghprb-plugin","full_name":"jenkinsci/ghprb-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/ghprb-plugin","description":"github pull requests builder plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/jenkinsci/ghprb-plugin","forks_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/releases{/id}","created_at":"2012-09-04T13:34:20Z","updated_at":"2015-09-24T18:55:41Z","pushed_at":"2015-09-26T08:41:18Z","git_url":"git://github.com/jenkinsci/ghprb-plugin.git","ssh_url":"git@github.com:jenkinsci/ghprb-plugin.git","clone_url":"https://github.com/jenkinsci/ghprb-plugin.git","svn_url":"https://github.com/jenkinsci/ghprb-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin","size":2740,"stargazers_count":114,"watchers_count":114,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":163,"mirror_url":null,"open_issues_count":32,"forks":163,"open_issues":32,"watchers":114,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"10071d5c76ef5b7236430aa1a1d82a76953d1085","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":5672873,"name":"ghprb-plugin","full_name":"jenkinsci/ghprb-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/ghprb-plugin","description":"github pull requests builder plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/jenkinsci/ghprb-plugin","forks_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/ghprb-plugin/releases{/id}","created_at":"2012-09-04T13:34:20Z","updated_at":"2015-09-24T18:55:41Z","pushed_at":"2015-09-26T08:41:18Z","git_url":"git://github.com/jenkinsci/ghprb-plugin.git","ssh_url":"git@github.com:jenkinsci/ghprb-plugin.git","clone_url":"https://github.com/jenkinsci/ghprb-plugin.git","svn_url":"https://github.com/jenkinsci/ghprb-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin","size":2740,"stargazers_count":114,"watchers_count":114,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":163,"mirror_url":null,"open_issues_count":32,"forks":163,"open_issues":32,"watchers":114,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202"},"html":{"href":"https://github.com/jenkinsci/ghprb-plugin/pull/202"},"issue":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/202"},"comments":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/issues/202/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/pulls/202/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/ghprb-plugin/statuses/f4f93158b8e69eca046d6039839e3d76d756fd9c"}}}}