{"action":"created","comment":{"url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/comments/78586858","id":78586858,"diff_hunk":"@@ -0,0 +1,284 @@\n+package com.solidbrain;\n+\n+import com.getbase.Client;\n+import com.getbase.Configuration;\n+import com.getbase.models.*;\n+import com.getbase.services.DealsService;\n+import com.getbase.services.StagesService;\n+import com.getbase.services.UsersService;\n+import com.getbase.sync.Meta;\n+import com.getbase.sync.Sync;\n+import lombok.extern.slf4j.Slf4j;\n+import org.springframework.beans.factory.annotation.Value;\n+import org.springframework.scheduling.annotation.Scheduled;\n+import org.springframework.stereotype.Component;\n+\n+import javax.annotation.PostConstruct;\n+import java.time.ZonedDateTime;\n+import java.time.format.DateTimeFormatter;\n+import java.util.*;\n+\n+import static java.util.stream.Collectors.toList;\n+\n+/**\n+ * Created by Krzysztof Wilk on 06/09/16.\n+ */\n+@Component\n+@Slf4j\n+class WorkflowTask {\n+    @Value(\"${workflow.salesrep.email.pattern}\")\n+    private String salesRepresentativeEmailPattern;\n+\n+    @Value(\"${workflow.accountmanager.email.pattern}\")\n+    private String accountManagerEmailPattern;\n+\n+    @Value(\"${workflow.account.manager.name}\")\n+    private String favouriteAccountManagerName;\n+\n+    @Value(\"${workflow.stage.first.name}\")\n+    private String firstStageName;\n+\n+    @Value(\"${workflow.stage.won.name}\")\n+    private String wonStageName;\n+\n+    @Value(\"${workflow.event.type.created.name}\")\n+    private String createdEventName;\n+\n+    @Value(\"${workflow.event.type.updated.name}\")\n+    private String updatedEventName;\n+\n+    @Value(\"${workflow.log.time.format}\")\n+    private String dateFormat;\n+    private DateTimeFormatter logDateFormat;\n+\n+    private final Client baseClient;\n+\n+    private Sync sync;\n+\n+    private final String deviceUuid;\n+\n+    private final Long firstStageId;\n+    private final Long wonStageId;\n+\n+    private final List<Long> activeStageIds;\n+\n+    private WorkflowTask() {\n+        String accessToken = getAccessToken();\n+\n+        baseClient = new Client(new Configuration.Builder()\n+                                        .accessToken(accessToken)\n+                                        .build());\n+\n+        firstStageId = getFirstStage().getId();\n+        wonStageId = getWonStage().getId();\n+\n+        activeStageIds = baseClient.stages()\n+                                    .list(new StagesService.SearchCriteria().active(true))\n+                                    .stream()\n+                                    .map(Stage::getId)\n+                                    .collect(toList());\n+\n+        deviceUuid = getDeviceUuid();\n+    }\n+\n+    private Stage getWonStage() {\n+        return baseClient.stages()\n+                .list(new StagesService.SearchCriteria().name(wonStageName))\n+                .stream()\n+                .findFirst()\n+                .orElseThrow(() -> new NoSuchElementException(\"Won stage of the pipeline not available\"));\n+    }\n+\n+    private Stage getFirstStage() {\n+        return baseClient.stages()\n+                .list(new StagesService.SearchCriteria().name(firstStageName))\n+                .stream()\n+                .findFirst()\n+                .orElseThrow(() -> new NoSuchElementException(\"First (incoming) stage of the pipeline not available\"));\n+    }\n+\n+    @PostConstruct\n+    private void initializeLogDateFormat() {\n+        this.logDateFormat = DateTimeFormatter.ofPattern(dateFormat);\n+    }\n+\n+\n+    /**\n+     * Main workflow loop\n+     */\n+    @Scheduled(fixedDelay = 5000)\n+    public void runWorkflow() {\n+        if (log.isInfoEnabled()) {\n+            log.info(\"Time {}\", logDateFormat.format(ZonedDateTime.now()));\n+        }\n+\n+        sync = new Sync(baseClient, deviceUuid);\n+\n+        // Workaround: https://gist.github.com/michal-mally/73ea265718a0d29aac350dd81528414f\n+        sync.subscribe(Account.class, (meta, account) -> true)\n+                .subscribe(Address.class, (meta, address) -> true)\n+                .subscribe(AssociatedContact.class, (meta, associatedContact) -> true)\n+                .subscribe(Contact.class, this::processContact)\n+                .subscribe(Deal.class, this::processDeal)\n+                .subscribe(LossReason.class, (meta, lossReason) -> true)\n+                .subscribe(Note.class, (meta, note) -> true)\n+                .subscribe(Pipeline.class, (meta, pipeline) -> true)\n+                .subscribe(Source.class, (meta, source) -> true)\n+                .subscribe(Stage.class, (meta, stage) -> true)\n+                .subscribe(Tag.class, (meta, tag) -> true)\n+                .subscribe(Task.class, (meta, task) -> true)\n+                .subscribe(User.class, (meta, user) -> true)\n+                .subscribe(Lead.class, (meta, lead) -> true)\n+                .fetch();\n+    }\n+\n+    private boolean processContact(Meta meta, Contact contact) {\n+        log.trace(\"Current contact={}\", contact);\n+\n+        String eventType = meta.getSync().getEventType();\n+        log.trace(\"eventType={}\", eventType);\n+        if (eventType.contentEquals(createdEventName) || eventType.contentEquals(updatedEventName)) {\n+            log.debug(\"Contact sync eventType={}\", eventType);\n+\n+            if (shouldNewDealBeCreated(contact)) {\n+                createNewDeal(contact);\n+            }\n+        }\n+        return true;\n+    }\n+\n+    private boolean processDeal(Meta meta, Deal deal) {\n+        log.trace(\"Current deal={}\", deal);\n+\n+        String eventType = meta.getSync().getEventType();\n+        log.trace(\"eventType={}\", eventType);\n+        if (eventType.contentEquals(createdEventName) || eventType.contentEquals(updatedEventName)) {\n+            log.debug(\"Deal sync eventType={}\", eventType);\n+\n+            verifyExistingDeal(deal);\n+        }\n+        return true;\n+    }\n+\n+    private void verifyExistingDeal(Deal deal) {\n+        if (isDealStageWon(deal)) {\n+            log.info(\"Verifying deal in Won stage\");\n+            log.debug(\"Deal={}\", deal);\n+\n+            Contact dealsContact = fetchExistingContact(deal.getContactId());\n+            log.trace(\"Deal's contact={}\", dealsContact);\n+\n+            User contactOwner = fetchOwner(dealsContact.getOwnerId());\n+            log.trace(\"Contact's owner={}\", contactOwner);\n+\n+            if (!isContactOwnerAnAccountManager(contactOwner)) {\n+                updateExistingContact(dealsContact);\n+            }\n+        }\n+    }\n+\n+    private boolean updateExistingContact(Contact dealsContact) {\n+        log.info(\"Updating contact's owner\");\n+\n+        Long accountManagerId = Optional.ofNullable(getUserIdByName(favouriteAccountManagerName))\n+                .orElseThrow(() -> new NoSuchElementException(\"User \" + favouriteAccountManagerName + \" not available\"));\n+\n+        log.trace(\"accountManagerId={}\", accountManagerId);\n+\n+        Map<String, Object> contactAttributes = new HashMap<>();\n+        contactAttributes.put(\"owner_id\", accountManagerId);\n+        Contact updatedContact = baseClient.contacts()\n+                                        .update(dealsContact.getId(), contactAttributes);\n+\n+        log.debug(\"Updated contact={}\", updatedContact);\n+\n+        return true;\n+    }\n+\n+    private Long getUserIdByName(String name) {\n+        List<User> foundUsers = baseClient.users()\n+                                    .list(new UsersService.SearchCriteria().name(name));\n+\n+        return foundUsers.isEmpty() ? null : foundUsers.get(0).getId();\n+    }\n+\n+    private boolean isContactOwnerAnAccountManager(User user) {\n+        return user.getEmail()\n+                .contains(accountManagerEmailPattern);\n+    }\n+\n+    private Contact fetchExistingContact(Long contactId) {","path":"src/main/java/com/solidbrain/WorkflowTask.java","position":210,"original_position":210,"commit_id":"6210b21ea440550183ec0ebd8532b272f22d6a87","original_commit_id":"6210b21ea440550183ec0ebd8532b272f22d6a87","user":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"body":"`contactId` should be primitive `long`.","created_at":"2016-09-13T15:45:37Z","updated_at":"2016-09-13T15:45:37Z","html_url":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1#discussion_r78586858","pull_request_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/comments/78586858"},"html":{"href":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1#discussion_r78586858"},"pull_request":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1","id":85058360,"html_url":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1","diff_url":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1.diff","patch_url":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1.patch","issue_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/1","number":1,"state":"open","locked":false,"title":"Milestone 1-3...","user":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-13T14:25:03Z","updated_at":"2016-09-13T15:45:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08fa79c7603818f9ee010578d12b343f5b2b430b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1/commits","review_comments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1/comments","review_comment_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/1/comments","statuses_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/statuses/6210b21ea440550183ec0ebd8532b272f22d6a87","head":{"label":"michal-mally:master","ref":"master","sha":"6210b21ea440550183ec0ebd8532b272f22d6a87","user":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"repo":{"id":68115386,"name":"BaseCrmSelfTraining","full_name":"michal-mally/BaseCrmSelfTraining","owner":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michal-mally/BaseCrmSelfTraining","description":null,"fork":true,"url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining","forks_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/forks","keys_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/teams","hooks_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/hooks","issue_events_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/events{/number}","events_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/events","assignees_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/assignees{/user}","branches_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/branches{/branch}","tags_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/tags","blobs_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/languages","stargazers_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/stargazers","contributors_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/contributors","subscribers_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/subscribers","subscription_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/subscription","commits_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/contents/{+path}","compare_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/merges","archive_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/downloads","issues_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues{/number}","pulls_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/labels{/name}","releases_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/releases{/id}","deployments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/deployments","created_at":"2016-09-13T14:20:01Z","updated_at":"2016-09-13T14:20:03Z","pushed_at":"2016-09-13T14:25:03Z","git_url":"git://github.com/michal-mally/BaseCrmSelfTraining.git","ssh_url":"git@github.com:michal-mally/BaseCrmSelfTraining.git","clone_url":"https://github.com/michal-mally/BaseCrmSelfTraining.git","svn_url":"https://github.com/michal-mally/BaseCrmSelfTraining","homepage":null,"size":134,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"michal-mally:initial","ref":"initial","sha":"f5152ffe08e5f38d3ac62baa6a46c8e7eb6f696f","user":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"repo":{"id":68115386,"name":"BaseCrmSelfTraining","full_name":"michal-mally/BaseCrmSelfTraining","owner":{"login":"michal-mally","id":2753108,"avatar_url":"https://avatars.githubusercontent.com/u/2753108?v=3","gravatar_id":"","url":"https://api.github.com/users/michal-mally","html_url":"https://github.com/michal-mally","followers_url":"https://api.github.com/users/michal-mally/followers","following_url":"https://api.github.com/users/michal-mally/following{/other_user}","gists_url":"https://api.github.com/users/michal-mally/gists{/gist_id}","starred_url":"https://api.github.com/users/michal-mally/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michal-mally/subscriptions","organizations_url":"https://api.github.com/users/michal-mally/orgs","repos_url":"https://api.github.com/users/michal-mally/repos","events_url":"https://api.github.com/users/michal-mally/events{/privacy}","received_events_url":"https://api.github.com/users/michal-mally/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michal-mally/BaseCrmSelfTraining","description":null,"fork":true,"url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining","forks_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/forks","keys_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/teams","hooks_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/hooks","issue_events_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/events{/number}","events_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/events","assignees_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/assignees{/user}","branches_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/branches{/branch}","tags_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/tags","blobs_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/languages","stargazers_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/stargazers","contributors_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/contributors","subscribers_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/subscribers","subscription_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/subscription","commits_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/contents/{+path}","compare_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/merges","archive_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/downloads","issues_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues{/number}","pulls_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/labels{/name}","releases_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/releases{/id}","deployments_url":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/deployments","created_at":"2016-09-13T14:20:01Z","updated_at":"2016-09-13T14:20:03Z","pushed_at":"2016-09-13T14:25:03Z","git_url":"git://github.com/michal-mally/BaseCrmSelfTraining.git","ssh_url":"git@github.com:michal-mally/BaseCrmSelfTraining.git","clone_url":"https://github.com/michal-mally/BaseCrmSelfTraining.git","svn_url":"https://github.com/michal-mally/BaseCrmSelfTraining","homepage":null,"size":134,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1"},"html":{"href":"https://github.com/michal-mally/BaseCrmSelfTraining/pull/1"},"issue":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/1"},"comments":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/michal-mally/BaseCrmSelfTraining/statuses/6210b21ea440550183ec0ebd8532b272f22d6a87"}}}}
{"actor":{"display_login":"michal-mally"}}