{"action":"created","comment":{"url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/comments/171710838","pull_request_review_id":100613417,"id":171710838,"diff_hunk":"@@ -31,12 +30,12 @@ public Response get(@PathParam(\"projectKey\") String projectKey, @PathParam(\"repo\n     return Response.ok(ImmutableMap.of(\n         \"requiredReviews\", config.getRequiredReviews() == null ? \"\" : config.getRequiredReviews(),\n         \"blockMergeIfPrNeedsWork\", config.getBlockMergeIfPrNeedsWork() == null ? \"\" : config.getBlockMergeIfPrNeedsWork(),\n-        \"requiredReviewers\", utils.dereferenceUsers(newArrayList(newHashSet(concat(","path":"src/main/java/com/monitorjbl/plugins/config/UserResource.java","position":12,"original_position":12,"commit_id":"3c9142cce79000f185b8d78a7c00caf7d2cce2d1","original_commit_id":"b45a931e79a8504acc991a431add5967fa6cd3c5","user":{"login":"bturner","id":121199,"avatar_url":"https://avatars0.githubusercontent.com/u/121199?v=4","gravatar_id":"","url":"https://api.github.com/users/bturner","html_url":"https://github.com/bturner","followers_url":"https://api.github.com/users/bturner/followers","following_url":"https://api.github.com/users/bturner/following{/other_user}","gists_url":"https://api.github.com/users/bturner/gists{/gist_id}","starred_url":"https://api.github.com/users/bturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturner/subscriptions","organizations_url":"https://api.github.com/users/bturner/orgs","repos_url":"https://api.github.com/users/bturner/repos","events_url":"https://api.github.com/users/bturner/events{/privacy}","received_events_url":"https://api.github.com/users/bturner/received_events","type":"User","site_admin":false},"body":"Turns out I'd introduced a more subtle breakage than that, in that `dereferenceGroups` and `dereferenceUsers` return different types (Strings and `User`s, respectively). I've fixed that now too.\r\n\r\nHowever, noticing _that_ led me to notice a different bug. Specifically, the `String`s returned by `dereferenceGroups` are user _slugs_, not user _names_. But in `CommitBlockerHook`, they're being compared to `UserProfile.getUsername()`. That means in any instance where users' names and slugs are not identical, configuring excluded groups will not actually work. So I fixed that too.\r\n\r\nThe _best_ fix for that is to replace references to SAL's `UserManager` with Bitbucket Server's `AuthenticationContext`, which returns an `ApplicationUser` directly (and allows access to its slug). Using `AuthenticationContext` also simplifies `ConfigServlet` and removes the need for `UserUtils.getApplicationUserByName`, so I removed that too.\r\n","created_at":"2018-03-01T22:12:59Z","updated_at":"2018-03-01T22:12:59Z","html_url":"https://github.com/monitorjbl/pr-harmony/pull/72#discussion_r171710838","pull_request_url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/comments/171710838"},"html":{"href":"https://github.com/monitorjbl/pr-harmony/pull/72#discussion_r171710838"},"pull_request":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72"}},"in_reply_to_id":171462430},"pull_request":{"url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72","id":172140953,"html_url":"https://github.com/monitorjbl/pr-harmony/pull/72","diff_url":"https://github.com/monitorjbl/pr-harmony/pull/72.diff","patch_url":"https://github.com/monitorjbl/pr-harmony/pull/72.patch","issue_url":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/72","number":72,"state":"open","locked":false,"title":"Use a separate ExecutorService to fix #71.","user":{"login":"bturner","id":121199,"avatar_url":"https://avatars0.githubusercontent.com/u/121199?v=4","gravatar_id":"","url":"https://api.github.com/users/bturner","html_url":"https://github.com/bturner","followers_url":"https://api.github.com/users/bturner/followers","following_url":"https://api.github.com/users/bturner/following{/other_user}","gists_url":"https://api.github.com/users/bturner/gists{/gist_id}","starred_url":"https://api.github.com/users/bturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturner/subscriptions","organizations_url":"https://api.github.com/users/bturner/orgs","repos_url":"https://api.github.com/users/bturner/repos","events_url":"https://api.github.com/users/bturner/events{/privacy}","received_events_url":"https://api.github.com/users/bturner/received_events","type":"User","site_admin":false},"body":"- Updated AsyncProcessor to look at the Bitbucket Server verson and choose between using the shared ExecutorService (5.9+) or creating its own ExecutorService (previous versions)\r\n  - Bitbucket Server 5.9 includes a fix which prevents add-ons using the shared BucketedExecutor from blocking hook callbacks\r\n- Removed some dead code in AsyncProcessor and PullRequestListener\r\n- Simplified Maven structure and reconfigured how integration and unit tests are distinguished\r\n  - Moved unit tests from src/test/java/ut to src/test/java\r\n  - Added a simple UserResourceTest which requests configuration for a repository which hasn't had any applied\r\n  - This verifies that the PR Harmony plugin has been installed and enabled successfully, and that its REST resource is available\r\n- Simplified some of the processing in UserUtils to use the API more efficiently and avoid various IDEA inspection warnings","created_at":"2018-03-01T04:31:56Z","updated_at":"2018-03-01T22:12:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5aa33947810c4eaf39964b1b5a126a6a2ff3f53d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72/commits","review_comments_url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72/comments","review_comment_url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/72/comments","statuses_url":"https://api.github.com/repos/monitorjbl/pr-harmony/statuses/3c9142cce79000f185b8d78a7c00caf7d2cce2d1","head":{"label":"bturner:issue-73","ref":"issue-73","sha":"3c9142cce79000f185b8d78a7c00caf7d2cce2d1","user":{"login":"bturner","id":121199,"avatar_url":"https://avatars0.githubusercontent.com/u/121199?v=4","gravatar_id":"","url":"https://api.github.com/users/bturner","html_url":"https://github.com/bturner","followers_url":"https://api.github.com/users/bturner/followers","following_url":"https://api.github.com/users/bturner/following{/other_user}","gists_url":"https://api.github.com/users/bturner/gists{/gist_id}","starred_url":"https://api.github.com/users/bturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturner/subscriptions","organizations_url":"https://api.github.com/users/bturner/orgs","repos_url":"https://api.github.com/users/bturner/repos","events_url":"https://api.github.com/users/bturner/events{/privacy}","received_events_url":"https://api.github.com/users/bturner/received_events","type":"User","site_admin":false},"repo":{"id":123356508,"name":"pr-harmony","full_name":"bturner/pr-harmony","owner":{"login":"bturner","id":121199,"avatar_url":"https://avatars0.githubusercontent.com/u/121199?v=4","gravatar_id":"","url":"https://api.github.com/users/bturner","html_url":"https://github.com/bturner","followers_url":"https://api.github.com/users/bturner/followers","following_url":"https://api.github.com/users/bturner/following{/other_user}","gists_url":"https://api.github.com/users/bturner/gists{/gist_id}","starred_url":"https://api.github.com/users/bturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturner/subscriptions","organizations_url":"https://api.github.com/users/bturner/orgs","repos_url":"https://api.github.com/users/bturner/repos","events_url":"https://api.github.com/users/bturner/events{/privacy}","received_events_url":"https://api.github.com/users/bturner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bturner/pr-harmony","description":"Extra pull request workflows for Stash","fork":true,"url":"https://api.github.com/repos/bturner/pr-harmony","forks_url":"https://api.github.com/repos/bturner/pr-harmony/forks","keys_url":"https://api.github.com/repos/bturner/pr-harmony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bturner/pr-harmony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bturner/pr-harmony/teams","hooks_url":"https://api.github.com/repos/bturner/pr-harmony/hooks","issue_events_url":"https://api.github.com/repos/bturner/pr-harmony/issues/events{/number}","events_url":"https://api.github.com/repos/bturner/pr-harmony/events","assignees_url":"https://api.github.com/repos/bturner/pr-harmony/assignees{/user}","branches_url":"https://api.github.com/repos/bturner/pr-harmony/branches{/branch}","tags_url":"https://api.github.com/repos/bturner/pr-harmony/tags","blobs_url":"https://api.github.com/repos/bturner/pr-harmony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bturner/pr-harmony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bturner/pr-harmony/git/refs{/sha}","trees_url":"https://api.github.com/repos/bturner/pr-harmony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bturner/pr-harmony/statuses/{sha}","languages_url":"https://api.github.com/repos/bturner/pr-harmony/languages","stargazers_url":"https://api.github.com/repos/bturner/pr-harmony/stargazers","contributors_url":"https://api.github.com/repos/bturner/pr-harmony/contributors","subscribers_url":"https://api.github.com/repos/bturner/pr-harmony/subscribers","subscription_url":"https://api.github.com/repos/bturner/pr-harmony/subscription","commits_url":"https://api.github.com/repos/bturner/pr-harmony/commits{/sha}","git_commits_url":"https://api.github.com/repos/bturner/pr-harmony/git/commits{/sha}","comments_url":"https://api.github.com/repos/bturner/pr-harmony/comments{/number}","issue_comment_url":"https://api.github.com/repos/bturner/pr-harmony/issues/comments{/number}","contents_url":"https://api.github.com/repos/bturner/pr-harmony/contents/{+path}","compare_url":"https://api.github.com/repos/bturner/pr-harmony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bturner/pr-harmony/merges","archive_url":"https://api.github.com/repos/bturner/pr-harmony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bturner/pr-harmony/downloads","issues_url":"https://api.github.com/repos/bturner/pr-harmony/issues{/number}","pulls_url":"https://api.github.com/repos/bturner/pr-harmony/pulls{/number}","milestones_url":"https://api.github.com/repos/bturner/pr-harmony/milestones{/number}","notifications_url":"https://api.github.com/repos/bturner/pr-harmony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bturner/pr-harmony/labels{/name}","releases_url":"https://api.github.com/repos/bturner/pr-harmony/releases{/id}","deployments_url":"https://api.github.com/repos/bturner/pr-harmony/deployments","created_at":"2018-02-28T23:48:24Z","updated_at":"2018-02-28T23:48:25Z","pushed_at":"2018-03-01T04:49:58Z","git_url":"git://github.com/bturner/pr-harmony.git","ssh_url":"git@github.com:bturner/pr-harmony.git","clone_url":"https://github.com/bturner/pr-harmony.git","svn_url":"https://github.com/bturner/pr-harmony","homepage":"","size":2420,"stargazers_count":0,"watchers_count":0,"language":"Java","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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"monitorjbl:master","ref":"master","sha":"ae997a095a0fae1162d93e8aedad2f6116392485","user":{"login":"monitorjbl","id":1149136,"avatar_url":"https://avatars0.githubusercontent.com/u/1149136?v=4","gravatar_id":"","url":"https://api.github.com/users/monitorjbl","html_url":"https://github.com/monitorjbl","followers_url":"https://api.github.com/users/monitorjbl/followers","following_url":"https://api.github.com/users/monitorjbl/following{/other_user}","gists_url":"https://api.github.com/users/monitorjbl/gists{/gist_id}","starred_url":"https://api.github.com/users/monitorjbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monitorjbl/subscriptions","organizations_url":"https://api.github.com/users/monitorjbl/orgs","repos_url":"https://api.github.com/users/monitorjbl/repos","events_url":"https://api.github.com/users/monitorjbl/events{/privacy}","received_events_url":"https://api.github.com/users/monitorjbl/received_events","type":"User","site_admin":false},"repo":{"id":35332619,"name":"pr-harmony","full_name":"monitorjbl/pr-harmony","owner":{"login":"monitorjbl","id":1149136,"avatar_url":"https://avatars0.githubusercontent.com/u/1149136?v=4","gravatar_id":"","url":"https://api.github.com/users/monitorjbl","html_url":"https://github.com/monitorjbl","followers_url":"https://api.github.com/users/monitorjbl/followers","following_url":"https://api.github.com/users/monitorjbl/following{/other_user}","gists_url":"https://api.github.com/users/monitorjbl/gists{/gist_id}","starred_url":"https://api.github.com/users/monitorjbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monitorjbl/subscriptions","organizations_url":"https://api.github.com/users/monitorjbl/orgs","repos_url":"https://api.github.com/users/monitorjbl/repos","events_url":"https://api.github.com/users/monitorjbl/events{/privacy}","received_events_url":"https://api.github.com/users/monitorjbl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/monitorjbl/pr-harmony","description":"Extra pull request workflows for Stash","fork":false,"url":"https://api.github.com/repos/monitorjbl/pr-harmony","forks_url":"https://api.github.com/repos/monitorjbl/pr-harmony/forks","keys_url":"https://api.github.com/repos/monitorjbl/pr-harmony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monitorjbl/pr-harmony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monitorjbl/pr-harmony/teams","hooks_url":"https://api.github.com/repos/monitorjbl/pr-harmony/hooks","issue_events_url":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/events{/number}","events_url":"https://api.github.com/repos/monitorjbl/pr-harmony/events","assignees_url":"https://api.github.com/repos/monitorjbl/pr-harmony/assignees{/user}","branches_url":"https://api.github.com/repos/monitorjbl/pr-harmony/branches{/branch}","tags_url":"https://api.github.com/repos/monitorjbl/pr-harmony/tags","blobs_url":"https://api.github.com/repos/monitorjbl/pr-harmony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monitorjbl/pr-harmony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monitorjbl/pr-harmony/git/refs{/sha}","trees_url":"https://api.github.com/repos/monitorjbl/pr-harmony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monitorjbl/pr-harmony/statuses/{sha}","languages_url":"https://api.github.com/repos/monitorjbl/pr-harmony/languages","stargazers_url":"https://api.github.com/repos/monitorjbl/pr-harmony/stargazers","contributors_url":"https://api.github.com/repos/monitorjbl/pr-harmony/contributors","subscribers_url":"https://api.github.com/repos/monitorjbl/pr-harmony/subscribers","subscription_url":"https://api.github.com/repos/monitorjbl/pr-harmony/subscription","commits_url":"https://api.github.com/repos/monitorjbl/pr-harmony/commits{/sha}","git_commits_url":"https://api.github.com/repos/monitorjbl/pr-harmony/git/commits{/sha}","comments_url":"https://api.github.com/repos/monitorjbl/pr-harmony/comments{/number}","issue_comment_url":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/comments{/number}","contents_url":"https://api.github.com/repos/monitorjbl/pr-harmony/contents/{+path}","compare_url":"https://api.github.com/repos/monitorjbl/pr-harmony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monitorjbl/pr-harmony/merges","archive_url":"https://api.github.com/repos/monitorjbl/pr-harmony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monitorjbl/pr-harmony/downloads","issues_url":"https://api.github.com/repos/monitorjbl/pr-harmony/issues{/number}","pulls_url":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls{/number}","milestones_url":"https://api.github.com/repos/monitorjbl/pr-harmony/milestones{/number}","notifications_url":"https://api.github.com/repos/monitorjbl/pr-harmony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monitorjbl/pr-harmony/labels{/name}","releases_url":"https://api.github.com/repos/monitorjbl/pr-harmony/releases{/id}","deployments_url":"https://api.github.com/repos/monitorjbl/pr-harmony/deployments","created_at":"2015-05-09T14:59:03Z","updated_at":"2018-02-25T23:55:07Z","pushed_at":"2018-03-01T04:49:59Z","git_url":"git://github.com/monitorjbl/pr-harmony.git","ssh_url":"git@github.com:monitorjbl/pr-harmony.git","clone_url":"https://github.com/monitorjbl/pr-harmony.git","svn_url":"https://github.com/monitorjbl/pr-harmony","homepage":"","size":2412,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":16,"open_issues":24,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72"},"html":{"href":"https://github.com/monitorjbl/pr-harmony/pull/72"},"issue":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/72"},"comments":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/monitorjbl/pr-harmony/statuses/3c9142cce79000f185b8d78a7c00caf7d2cce2d1"}},"author_association":"NONE"}}
{"actor":{"display_login":"bturner"}}