{"action":"created","comment":{"url":"https://api.github.com/repos/zerocracy/farm/pulls/comments/216980172","pull_request_review_id":154585057,"id":216980172,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjk4MDE3Mg==","diff_hunk":"@@ -0,0 +1,74 @@\n+/*\n+ * Copyright (c) 2016-2018 Zerocracy\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to read\n+ * the Software only. Permissions is hereby NOT GRANTED to use, copy, modify,\n+ * merge, publish, distribute, sublicense, and/or sell copies of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+package com.zerocracy.stk.pmo.people\n+\n+import com.jcabi.github.User\n+import com.jcabi.xml.XML\n+import com.zerocracy.Farm\n+import com.zerocracy.Par\n+import com.zerocracy.Project\n+import com.zerocracy.claims.ClaimIn\n+import com.zerocracy.claims.ClaimOut\n+import com.zerocracy.entry.ClaimsOf\n+import com.zerocracy.entry.ExtGithub\n+import com.zerocracy.farm.Assume\n+import com.zerocracy.farm.props.Props\n+import com.zerocracy.pmo.People\n+import groovy.mock.interceptor.MockFor\n+import java.util.concurrent.TimeUnit\n+\n+def exec(Project pmo, XML xml) {\n+  new Assume(pmo, xml).isPmo()\n+  new Assume(pmo, xml).type('Ping daily')\n+  Farm farm = binding.variables.farm\n+  People people = new People(farm).bootstrap()\n+  ClaimIn claim = new ClaimIn(xml)\n+  people.iterate().each { uid ->\n+    User.Smart user = new User.Smart(new ExtGithub(farm).value().users().get(uid))\n+    boolean org = user.type() == 'Organization'\n+    if (new Props(farm).has('//testing')) {\n+      MockFor mock = new MockFor(User.Smart)","path":"src/main/groovy/com/zerocracy/stk/pmo/people/remove_organizations.groovy","position":44,"original_position":44,"commit_id":"becd63c55f90004e8d37923fa4d1496a339674b3","original_commit_id":"becd63c55f90004e8d37923fa4d1496a339674b3","user":{"login":"g4s8","id":1524988,"node_id":"MDQ6VXNlcjE1MjQ5ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1524988?v=4","gravatar_id":"","url":"https://api.github.com/users/g4s8","html_url":"https://github.com/g4s8","followers_url":"https://api.github.com/users/g4s8/followers","following_url":"https://api.github.com/users/g4s8/following{/other_user}","gists_url":"https://api.github.com/users/g4s8/gists{/gist_id}","starred_url":"https://api.github.com/users/g4s8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g4s8/subscriptions","organizations_url":"https://api.github.com/users/g4s8/orgs","repos_url":"https://api.github.com/users/g4s8/repos","events_url":"https://api.github.com/users/g4s8/events{/privacy}","received_events_url":"https://api.github.com/users/g4s8/received_events","type":"User","site_admin":false},"body":"@carlosmiranda what does this code (with mockito) do? I'm not sure that it's a good idea to use mocks in app code.","created_at":"2018-09-12T10:37:49Z","updated_at":"2018-09-12T10:39:00Z","html_url":"https://github.com/zerocracy/farm/pull/1689#discussion_r216980172","pull_request_url":"https://api.github.com/repos/zerocracy/farm/pulls/1689","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/comments/216980172"},"html":{"href":"https://github.com/zerocracy/farm/pull/1689#discussion_r216980172"},"pull_request":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/1689"}}},"pull_request":{"url":"https://api.github.com/repos/zerocracy/farm/pulls/1689","id":213490784,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDkwNzg0","html_url":"https://github.com/zerocracy/farm/pull/1689","diff_url":"https://github.com/zerocracy/farm/pull/1689.diff","patch_url":"https://github.com/zerocracy/farm/pull/1689.patch","issue_url":"https://api.github.com/repos/zerocracy/farm/issues/1689","number":1689,"state":"open","locked":false,"title":"#898 Remove Github organizations","user":{"login":"carlosmiranda","id":1917892,"node_id":"MDQ6VXNlcjE5MTc4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1917892?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosmiranda","html_url":"https://github.com/carlosmiranda","followers_url":"https://api.github.com/users/carlosmiranda/followers","following_url":"https://api.github.com/users/carlosmiranda/following{/other_user}","gists_url":"https://api.github.com/users/carlosmiranda/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmiranda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmiranda/subscriptions","organizations_url":"https://api.github.com/users/carlosmiranda/orgs","repos_url":"https://api.github.com/users/carlosmiranda/repos","events_url":"https://api.github.com/users/carlosmiranda/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmiranda/received_events","type":"User","site_admin":false},"body":"#898: Users that are converted to Github organizations are now notified and then deleted after 24 hours.","created_at":"2018-09-06T04:15:52Z","updated_at":"2018-09-12T10:39:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73154501214c5652dde33433ced91a2fffefc1a8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":817441668,"node_id":"MDU6TGFiZWw4MTc0NDE2Njg=","url":"https://api.github.com/repos/zerocracy/farm/labels/scope","name":"scope","color":"3a6622","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zerocracy/farm/pulls/1689/commits","review_comments_url":"https://api.github.com/repos/zerocracy/farm/pulls/1689/comments","review_comment_url":"https://api.github.com/repos/zerocracy/farm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zerocracy/farm/issues/1689/comments","statuses_url":"https://api.github.com/repos/zerocracy/farm/statuses/becd63c55f90004e8d37923fa4d1496a339674b3","head":{"label":"carlosmiranda:898","ref":"898","sha":"becd63c55f90004e8d37923fa4d1496a339674b3","user":{"login":"carlosmiranda","id":1917892,"node_id":"MDQ6VXNlcjE5MTc4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1917892?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosmiranda","html_url":"https://github.com/carlosmiranda","followers_url":"https://api.github.com/users/carlosmiranda/followers","following_url":"https://api.github.com/users/carlosmiranda/following{/other_user}","gists_url":"https://api.github.com/users/carlosmiranda/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmiranda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmiranda/subscriptions","organizations_url":"https://api.github.com/users/carlosmiranda/orgs","repos_url":"https://api.github.com/users/carlosmiranda/repos","events_url":"https://api.github.com/users/carlosmiranda/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmiranda/received_events","type":"User","site_admin":false},"repo":{"id":118709902,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3MDk5MDI=","name":"farm-1","full_name":"carlosmiranda/farm-1","owner":{"login":"carlosmiranda","id":1917892,"node_id":"MDQ6VXNlcjE5MTc4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1917892?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosmiranda","html_url":"https://github.com/carlosmiranda","followers_url":"https://api.github.com/users/carlosmiranda/followers","following_url":"https://api.github.com/users/carlosmiranda/following{/other_user}","gists_url":"https://api.github.com/users/carlosmiranda/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmiranda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmiranda/subscriptions","organizations_url":"https://api.github.com/users/carlosmiranda/orgs","repos_url":"https://api.github.com/users/carlosmiranda/repos","events_url":"https://api.github.com/users/carlosmiranda/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmiranda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carlosmiranda/farm-1","description":"Zerocrat Core Engine","fork":true,"url":"https://api.github.com/repos/carlosmiranda/farm-1","forks_url":"https://api.github.com/repos/carlosmiranda/farm-1/forks","keys_url":"https://api.github.com/repos/carlosmiranda/farm-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carlosmiranda/farm-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carlosmiranda/farm-1/teams","hooks_url":"https://api.github.com/repos/carlosmiranda/farm-1/hooks","issue_events_url":"https://api.github.com/repos/carlosmiranda/farm-1/issues/events{/number}","events_url":"https://api.github.com/repos/carlosmiranda/farm-1/events","assignees_url":"https://api.github.com/repos/carlosmiranda/farm-1/assignees{/user}","branches_url":"https://api.github.com/repos/carlosmiranda/farm-1/branches{/branch}","tags_url":"https://api.github.com/repos/carlosmiranda/farm-1/tags","blobs_url":"https://api.github.com/repos/carlosmiranda/farm-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carlosmiranda/farm-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carlosmiranda/farm-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/carlosmiranda/farm-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carlosmiranda/farm-1/statuses/{sha}","languages_url":"https://api.github.com/repos/carlosmiranda/farm-1/languages","stargazers_url":"https://api.github.com/repos/carlosmiranda/farm-1/stargazers","contributors_url":"https://api.github.com/repos/carlosmiranda/farm-1/contributors","subscribers_url":"https://api.github.com/repos/carlosmiranda/farm-1/subscribers","subscription_url":"https://api.github.com/repos/carlosmiranda/farm-1/subscription","commits_url":"https://api.github.com/repos/carlosmiranda/farm-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/carlosmiranda/farm-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/carlosmiranda/farm-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/carlosmiranda/farm-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/carlosmiranda/farm-1/contents/{+path}","compare_url":"https://api.github.com/repos/carlosmiranda/farm-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carlosmiranda/farm-1/merges","archive_url":"https://api.github.com/repos/carlosmiranda/farm-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carlosmiranda/farm-1/downloads","issues_url":"https://api.github.com/repos/carlosmiranda/farm-1/issues{/number}","pulls_url":"https://api.github.com/repos/carlosmiranda/farm-1/pulls{/number}","milestones_url":"https://api.github.com/repos/carlosmiranda/farm-1/milestones{/number}","notifications_url":"https://api.github.com/repos/carlosmiranda/farm-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carlosmiranda/farm-1/labels{/name}","releases_url":"https://api.github.com/repos/carlosmiranda/farm-1/releases{/id}","deployments_url":"https://api.github.com/repos/carlosmiranda/farm-1/deployments","created_at":"2018-01-24T04:04:48Z","updated_at":"2018-09-03T05:56:38Z","pushed_at":"2018-09-10T03:55:34Z","git_url":"git://github.com/carlosmiranda/farm-1.git","ssh_url":"git@github.com:carlosmiranda/farm-1.git","clone_url":"https://github.com/carlosmiranda/farm-1.git","svn_url":"https://github.com/carlosmiranda/farm-1","homepage":"http://www.0crat.com","size":7448,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zerocracy:master","ref":"master","sha":"f77cb9d8630bc77c7c454bdec68f7c3e1c3c5644","user":{"login":"zerocracy","id":24234201,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0MjM0MjAx","avatar_url":"https://avatars2.githubusercontent.com/u/24234201?v=4","gravatar_id":"","url":"https://api.github.com/users/zerocracy","html_url":"https://github.com/zerocracy","followers_url":"https://api.github.com/users/zerocracy/followers","following_url":"https://api.github.com/users/zerocracy/following{/other_user}","gists_url":"https://api.github.com/users/zerocracy/gists{/gist_id}","starred_url":"https://api.github.com/users/zerocracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerocracy/subscriptions","organizations_url":"https://api.github.com/users/zerocracy/orgs","repos_url":"https://api.github.com/users/zerocracy/repos","events_url":"https://api.github.com/users/zerocracy/events{/privacy}","received_events_url":"https://api.github.com/users/zerocracy/received_events","type":"Organization","site_admin":false},"repo":{"id":75332684,"node_id":"MDEwOlJlcG9zaXRvcnk3NTMzMjY4NA==","name":"farm","full_name":"zerocracy/farm","owner":{"login":"zerocracy","id":24234201,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0MjM0MjAx","avatar_url":"https://avatars2.githubusercontent.com/u/24234201?v=4","gravatar_id":"","url":"https://api.github.com/users/zerocracy","html_url":"https://github.com/zerocracy","followers_url":"https://api.github.com/users/zerocracy/followers","following_url":"https://api.github.com/users/zerocracy/following{/other_user}","gists_url":"https://api.github.com/users/zerocracy/gists{/gist_id}","starred_url":"https://api.github.com/users/zerocracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerocracy/subscriptions","organizations_url":"https://api.github.com/users/zerocracy/orgs","repos_url":"https://api.github.com/users/zerocracy/repos","events_url":"https://api.github.com/users/zerocracy/events{/privacy}","received_events_url":"https://api.github.com/users/zerocracy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zerocracy/farm","description":"Zerocrat Core Engine","fork":false,"url":"https://api.github.com/repos/zerocracy/farm","forks_url":"https://api.github.com/repos/zerocracy/farm/forks","keys_url":"https://api.github.com/repos/zerocracy/farm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zerocracy/farm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zerocracy/farm/teams","hooks_url":"https://api.github.com/repos/zerocracy/farm/hooks","issue_events_url":"https://api.github.com/repos/zerocracy/farm/issues/events{/number}","events_url":"https://api.github.com/repos/zerocracy/farm/events","assignees_url":"https://api.github.com/repos/zerocracy/farm/assignees{/user}","branches_url":"https://api.github.com/repos/zerocracy/farm/branches{/branch}","tags_url":"https://api.github.com/repos/zerocracy/farm/tags","blobs_url":"https://api.github.com/repos/zerocracy/farm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zerocracy/farm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zerocracy/farm/git/refs{/sha}","trees_url":"https://api.github.com/repos/zerocracy/farm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zerocracy/farm/statuses/{sha}","languages_url":"https://api.github.com/repos/zerocracy/farm/languages","stargazers_url":"https://api.github.com/repos/zerocracy/farm/stargazers","contributors_url":"https://api.github.com/repos/zerocracy/farm/contributors","subscribers_url":"https://api.github.com/repos/zerocracy/farm/subscribers","subscription_url":"https://api.github.com/repos/zerocracy/farm/subscription","commits_url":"https://api.github.com/repos/zerocracy/farm/commits{/sha}","git_commits_url":"https://api.github.com/repos/zerocracy/farm/git/commits{/sha}","comments_url":"https://api.github.com/repos/zerocracy/farm/comments{/number}","issue_comment_url":"https://api.github.com/repos/zerocracy/farm/issues/comments{/number}","contents_url":"https://api.github.com/repos/zerocracy/farm/contents/{+path}","compare_url":"https://api.github.com/repos/zerocracy/farm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zerocracy/farm/merges","archive_url":"https://api.github.com/repos/zerocracy/farm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zerocracy/farm/downloads","issues_url":"https://api.github.com/repos/zerocracy/farm/issues{/number}","pulls_url":"https://api.github.com/repos/zerocracy/farm/pulls{/number}","milestones_url":"https://api.github.com/repos/zerocracy/farm/milestones{/number}","notifications_url":"https://api.github.com/repos/zerocracy/farm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zerocracy/farm/labels{/name}","releases_url":"https://api.github.com/repos/zerocracy/farm/releases{/id}","deployments_url":"https://api.github.com/repos/zerocracy/farm/deployments","created_at":"2016-12-01T21:05:11Z","updated_at":"2018-09-10T05:17:13Z","pushed_at":"2018-09-10T05:24:15Z","git_url":"git://github.com/zerocracy/farm.git","ssh_url":"git@github.com:zerocracy/farm.git","clone_url":"https://github.com/zerocracy/farm.git","svn_url":"https://github.com/zerocracy/farm","homepage":"https://www.0crat.com","size":7566,"stargazers_count":143,"watchers_count":143,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":294,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":39,"open_issues":294,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/1689"},"html":{"href":"https://github.com/zerocracy/farm/pull/1689"},"issue":{"href":"https://api.github.com/repos/zerocracy/farm/issues/1689"},"comments":{"href":"https://api.github.com/repos/zerocracy/farm/issues/1689/comments"},"review_comments":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/1689/comments"},"review_comment":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zerocracy/farm/pulls/1689/commits"},"statuses":{"href":"https://api.github.com/repos/zerocracy/farm/statuses/becd63c55f90004e8d37923fa4d1496a339674b3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"g4s8"}}