{"action":"created","comment":{"url":"https://api.github.com/repos/yu55/yagga/pulls/comments/50683280","id":50683280,"diff_hunk":"@@ -0,0 +1,87 @@\n+package org.yu55.yagga.handler.generic;\n+\n+\n+import org.junit.Test;\n+import org.yu55.yagga.handler.api.DvcsRepository;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+import static org.mockito.Mockito.*;\n+\n+public class RepositoriesTest {\n+\n+    @Test\n+    public void shouldUpdateOnConstruction() {\n+\n+        // given\n+        DvcsRepository existingRepository = mock(DvcsRepository.class);\n+        DvcsRepository newlyCreatedRepository = mock(DvcsRepository.class);\n+        List<DvcsRepository> repositoryList1 = new ArrayList<>();\n+        repositoryList1.add(existingRepository);\n+        List<DvcsRepository> repositoryList2 = new ArrayList<>();\n+        repositoryList2.add(newlyCreatedRepository);\n+\n+        RepositoriesFileVisitor repositoriesFileVisitor = mock(RepositoriesFileVisitor.class);\n+        when(repositoriesFileVisitor.getRepositories()).thenReturn(repositoryList1, repositoryList2);\n+\n+        Repositories repositories = new Repositories(repositoriesFileVisitor);\n+\n+        // when\n+        List<DvcsRepository> result = repositories.getRepositories();\n+\n+        // flush","path":"src/test/java/org/yu55/yagga/handler/generic/RepositoriesTest.java","position":34,"original_position":34,"commit_id":"ada05db03aba96bc0fabd97d71ff1f3f198674b5","original_commit_id":"ada05db03aba96bc0fabd97d71ff1f3f198674b5","user":{"login":"yu55","id":1789867,"avatar_url":"https://avatars.githubusercontent.com/u/1789867?v=3","gravatar_id":"","url":"https://api.github.com/users/yu55","html_url":"https://github.com/yu55","followers_url":"https://api.github.com/users/yu55/followers","following_url":"https://api.github.com/users/yu55/following{/other_user}","gists_url":"https://api.github.com/users/yu55/gists{/gist_id}","starred_url":"https://api.github.com/users/yu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu55/subscriptions","organizations_url":"https://api.github.com/users/yu55/orgs","repos_url":"https://api.github.com/users/yu55/repos","events_url":"https://api.github.com/users/yu55/events{/privacy}","received_events_url":"https://api.github.com/users/yu55/received_events","type":"User","site_admin":false},"body":"WTF is flush? :laughing: ","created_at":"2016-01-25T11:36:44Z","updated_at":"2016-01-25T11:36:44Z","html_url":"https://github.com/yu55/yagga/pull/54#discussion_r50683280","pull_request_url":"https://api.github.com/repos/yu55/yagga/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/yu55/yagga/pulls/comments/50683280"},"html":{"href":"https://github.com/yu55/yagga/pull/54#discussion_r50683280"},"pull_request":{"href":"https://api.github.com/repos/yu55/yagga/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/yu55/yagga/pulls/54","id":57037217,"html_url":"https://github.com/yu55/yagga/pull/54","diff_url":"https://github.com/yu55/yagga/pull/54.diff","patch_url":"https://github.com/yu55/yagga/pull/54.patch","issue_url":"https://api.github.com/repos/yu55/yagga/issues/54","number":54,"state":"open","locked":false,"title":"Repository changes detection","user":{"login":"mfejzer","id":3902851,"avatar_url":"https://avatars.githubusercontent.com/u/3902851?v=3","gravatar_id":"","url":"https://api.github.com/users/mfejzer","html_url":"https://github.com/mfejzer","followers_url":"https://api.github.com/users/mfejzer/followers","following_url":"https://api.github.com/users/mfejzer/following{/other_user}","gists_url":"https://api.github.com/users/mfejzer/gists{/gist_id}","starred_url":"https://api.github.com/users/mfejzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfejzer/subscriptions","organizations_url":"https://api.github.com/users/mfejzer/orgs","repos_url":"https://api.github.com/users/mfejzer/repos","events_url":"https://api.github.com/users/mfejzer/events{/privacy}","received_events_url":"https://api.github.com/users/mfejzer/received_events","type":"User","site_admin":false},"body":"#51 ","created_at":"2016-01-25T07:39:22Z","updated_at":"2016-01-25T11:36:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae5407fde0a70a9571c06d641f6e219fefff2aa3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yu55/yagga/pulls/54/commits","review_comments_url":"https://api.github.com/repos/yu55/yagga/pulls/54/comments","review_comment_url":"https://api.github.com/repos/yu55/yagga/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yu55/yagga/issues/54/comments","statuses_url":"https://api.github.com/repos/yu55/yagga/statuses/ada05db03aba96bc0fabd97d71ff1f3f198674b5","head":{"label":"mfejzer:repository-changes-detection","ref":"repository-changes-detection","sha":"ada05db03aba96bc0fabd97d71ff1f3f198674b5","user":{"login":"mfejzer","id":3902851,"avatar_url":"https://avatars.githubusercontent.com/u/3902851?v=3","gravatar_id":"","url":"https://api.github.com/users/mfejzer","html_url":"https://github.com/mfejzer","followers_url":"https://api.github.com/users/mfejzer/followers","following_url":"https://api.github.com/users/mfejzer/following{/other_user}","gists_url":"https://api.github.com/users/mfejzer/gists{/gist_id}","starred_url":"https://api.github.com/users/mfejzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfejzer/subscriptions","organizations_url":"https://api.github.com/users/mfejzer/orgs","repos_url":"https://api.github.com/users/mfejzer/repos","events_url":"https://api.github.com/users/mfejzer/events{/privacy}","received_events_url":"https://api.github.com/users/mfejzer/received_events","type":"User","site_admin":false},"repo":{"id":46211551,"name":"yagga","full_name":"mfejzer/yagga","owner":{"login":"mfejzer","id":3902851,"avatar_url":"https://avatars.githubusercontent.com/u/3902851?v=3","gravatar_id":"","url":"https://api.github.com/users/mfejzer","html_url":"https://github.com/mfejzer","followers_url":"https://api.github.com/users/mfejzer/followers","following_url":"https://api.github.com/users/mfejzer/following{/other_user}","gists_url":"https://api.github.com/users/mfejzer/gists{/gist_id}","starred_url":"https://api.github.com/users/mfejzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfejzer/subscriptions","organizations_url":"https://api.github.com/users/mfejzer/orgs","repos_url":"https://api.github.com/users/mfejzer/repos","events_url":"https://api.github.com/users/mfejzer/events{/privacy}","received_events_url":"https://api.github.com/users/mfejzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfejzer/yagga","description":"Yet Another Git Grep Application - simple web application that allows you to git grep over many repositories via web interface.","fork":true,"url":"https://api.github.com/repos/mfejzer/yagga","forks_url":"https://api.github.com/repos/mfejzer/yagga/forks","keys_url":"https://api.github.com/repos/mfejzer/yagga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfejzer/yagga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfejzer/yagga/teams","hooks_url":"https://api.github.com/repos/mfejzer/yagga/hooks","issue_events_url":"https://api.github.com/repos/mfejzer/yagga/issues/events{/number}","events_url":"https://api.github.com/repos/mfejzer/yagga/events","assignees_url":"https://api.github.com/repos/mfejzer/yagga/assignees{/user}","branches_url":"https://api.github.com/repos/mfejzer/yagga/branches{/branch}","tags_url":"https://api.github.com/repos/mfejzer/yagga/tags","blobs_url":"https://api.github.com/repos/mfejzer/yagga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfejzer/yagga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfejzer/yagga/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfejzer/yagga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfejzer/yagga/statuses/{sha}","languages_url":"https://api.github.com/repos/mfejzer/yagga/languages","stargazers_url":"https://api.github.com/repos/mfejzer/yagga/stargazers","contributors_url":"https://api.github.com/repos/mfejzer/yagga/contributors","subscribers_url":"https://api.github.com/repos/mfejzer/yagga/subscribers","subscription_url":"https://api.github.com/repos/mfejzer/yagga/subscription","commits_url":"https://api.github.com/repos/mfejzer/yagga/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfejzer/yagga/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfejzer/yagga/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfejzer/yagga/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfejzer/yagga/contents/{+path}","compare_url":"https://api.github.com/repos/mfejzer/yagga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfejzer/yagga/merges","archive_url":"https://api.github.com/repos/mfejzer/yagga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfejzer/yagga/downloads","issues_url":"https://api.github.com/repos/mfejzer/yagga/issues{/number}","pulls_url":"https://api.github.com/repos/mfejzer/yagga/pulls{/number}","milestones_url":"https://api.github.com/repos/mfejzer/yagga/milestones{/number}","notifications_url":"https://api.github.com/repos/mfejzer/yagga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfejzer/yagga/labels{/name}","releases_url":"https://api.github.com/repos/mfejzer/yagga/releases{/id}","deployments_url":"https://api.github.com/repos/mfejzer/yagga/deployments","created_at":"2015-11-15T09:21:26Z","updated_at":"2016-01-21T17:24:59Z","pushed_at":"2016-01-22T20:24:03Z","git_url":"git://github.com/mfejzer/yagga.git","ssh_url":"git@github.com:mfejzer/yagga.git","clone_url":"https://github.com/mfejzer/yagga.git","svn_url":"https://github.com/mfejzer/yagga","homepage":"https://github.com/yu55/yagga","size":1352,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yu55:master","ref":"master","sha":"c970b51edc709bc77120ce105a7f524993d64436","user":{"login":"yu55","id":1789867,"avatar_url":"https://avatars.githubusercontent.com/u/1789867?v=3","gravatar_id":"","url":"https://api.github.com/users/yu55","html_url":"https://github.com/yu55","followers_url":"https://api.github.com/users/yu55/followers","following_url":"https://api.github.com/users/yu55/following{/other_user}","gists_url":"https://api.github.com/users/yu55/gists{/gist_id}","starred_url":"https://api.github.com/users/yu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu55/subscriptions","organizations_url":"https://api.github.com/users/yu55/orgs","repos_url":"https://api.github.com/users/yu55/repos","events_url":"https://api.github.com/users/yu55/events{/privacy}","received_events_url":"https://api.github.com/users/yu55/received_events","type":"User","site_admin":false},"repo":{"id":42675041,"name":"yagga","full_name":"yu55/yagga","owner":{"login":"yu55","id":1789867,"avatar_url":"https://avatars.githubusercontent.com/u/1789867?v=3","gravatar_id":"","url":"https://api.github.com/users/yu55","html_url":"https://github.com/yu55","followers_url":"https://api.github.com/users/yu55/followers","following_url":"https://api.github.com/users/yu55/following{/other_user}","gists_url":"https://api.github.com/users/yu55/gists{/gist_id}","starred_url":"https://api.github.com/users/yu55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yu55/subscriptions","organizations_url":"https://api.github.com/users/yu55/orgs","repos_url":"https://api.github.com/users/yu55/repos","events_url":"https://api.github.com/users/yu55/events{/privacy}","received_events_url":"https://api.github.com/users/yu55/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yu55/yagga","description":"Yet Another Git Grep Application - simple web application that allows you to git grep over many repositories via web interface.","fork":false,"url":"https://api.github.com/repos/yu55/yagga","forks_url":"https://api.github.com/repos/yu55/yagga/forks","keys_url":"https://api.github.com/repos/yu55/yagga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yu55/yagga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yu55/yagga/teams","hooks_url":"https://api.github.com/repos/yu55/yagga/hooks","issue_events_url":"https://api.github.com/repos/yu55/yagga/issues/events{/number}","events_url":"https://api.github.com/repos/yu55/yagga/events","assignees_url":"https://api.github.com/repos/yu55/yagga/assignees{/user}","branches_url":"https://api.github.com/repos/yu55/yagga/branches{/branch}","tags_url":"https://api.github.com/repos/yu55/yagga/tags","blobs_url":"https://api.github.com/repos/yu55/yagga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yu55/yagga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yu55/yagga/git/refs{/sha}","trees_url":"https://api.github.com/repos/yu55/yagga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yu55/yagga/statuses/{sha}","languages_url":"https://api.github.com/repos/yu55/yagga/languages","stargazers_url":"https://api.github.com/repos/yu55/yagga/stargazers","contributors_url":"https://api.github.com/repos/yu55/yagga/contributors","subscribers_url":"https://api.github.com/repos/yu55/yagga/subscribers","subscription_url":"https://api.github.com/repos/yu55/yagga/subscription","commits_url":"https://api.github.com/repos/yu55/yagga/commits{/sha}","git_commits_url":"https://api.github.com/repos/yu55/yagga/git/commits{/sha}","comments_url":"https://api.github.com/repos/yu55/yagga/comments{/number}","issue_comment_url":"https://api.github.com/repos/yu55/yagga/issues/comments{/number}","contents_url":"https://api.github.com/repos/yu55/yagga/contents/{+path}","compare_url":"https://api.github.com/repos/yu55/yagga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yu55/yagga/merges","archive_url":"https://api.github.com/repos/yu55/yagga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yu55/yagga/downloads","issues_url":"https://api.github.com/repos/yu55/yagga/issues{/number}","pulls_url":"https://api.github.com/repos/yu55/yagga/pulls{/number}","milestones_url":"https://api.github.com/repos/yu55/yagga/milestones{/number}","notifications_url":"https://api.github.com/repos/yu55/yagga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yu55/yagga/labels{/name}","releases_url":"https://api.github.com/repos/yu55/yagga/releases{/id}","deployments_url":"https://api.github.com/repos/yu55/yagga/deployments","created_at":"2015-09-17T18:46:42Z","updated_at":"2016-01-24T20:36:06Z","pushed_at":"2016-01-25T07:39:22Z","git_url":"git://github.com/yu55/yagga.git","ssh_url":"git@github.com:yu55/yagga.git","clone_url":"https://github.com/yu55/yagga.git","svn_url":"https://github.com/yu55/yagga","homepage":"https://github.com/yu55/yagga","size":1342,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yu55/yagga/pulls/54"},"html":{"href":"https://github.com/yu55/yagga/pull/54"},"issue":{"href":"https://api.github.com/repos/yu55/yagga/issues/54"},"comments":{"href":"https://api.github.com/repos/yu55/yagga/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/yu55/yagga/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/yu55/yagga/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yu55/yagga/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/yu55/yagga/statuses/ada05db03aba96bc0fabd97d71ff1f3f198674b5"}}}}