{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civihr/pulls/comments/99576138","pull_request_review_id":20251947,"id":99576138,"diff_hunk":"@@ -9,21 +11,352 @@ define([\n     templateUrl: ['settings', function (settings) {\n       return settings.pathTpl + 'components/my-leave-calendar.html';\n     }],\n-    controllerAs: 'calendar',\n-    controller: ['$log', controller]\n+    controllerAs: 'ctrl',\n+    controller: ['$log', '$q', 'OptionGroup', 'AbsencePeriod', 'AbsenceType',\n+      'Calendar', 'PublicHoliday', 'LeaveRequest', controller]\n   });\n \n \n-  function controller($log) {\n+  function controller($log, $q, OptionGroup, AbsencePeriod, AbsenceType, Calendar, PublicHoliday, LeaveRequest) {\n     $log.debug('Component: my-leave-calendar');\n \n-    init.call(this);\n+    var vm = Object.create(this),\n+      dayTypes = [],\n+      leaveRequests = [],\n+      publicHolidays = [],\n+      leaveRequestStatuses = [];\n+\n+    vm.absencePeriods = [];\n+    vm.absenceTypes = [];\n+    vm.calendar = {};\n+    vm.loading = false;\n+    vm.months = ['January', 'February', 'March', 'April', 'May', 'June',\n+      'July', 'August', 'September', 'October', 'November', 'December'];\n+    //Select current month as default\n+    vm.selectedMonths = [vm.months[new Date().getMonth()]];\n+    vm.selectedPeriod = null;\n+\n+    /**\n+     * Decides whether sent date is a public holiday\n+     *\n+     * @param  {string} date\n+     * @return {boolean}\n+     */\n+    vm.isPublicHoliday = function (date) {\n+      return !!publicHolidays[new Date(date).getTime()];\n+    };\n+\n+    /**\n+     * Labels the given period according to whether it's current or not\n+     *\n+     * @param  {AbsencePeriodInstance} period\n+     * @return {string}\n+     */\n+    vm.labelPeriod = function (period) {\n+      return period.current ? 'Current Period (' + period.title + ')' : period.title;\n+    };\n+\n+    /**\n+     * Returns day name of the sent date(Monday, Tuesday etc.)\n+     *\n+     * @param  {string} date\n+     * @return {string}\n+     */\n+    vm.getDayName = function (date) {\n+      return new Date(date).toString().substr(0,3);\n+    };\n+\n+    /**\n+     * Returns the calendar information for a specific month\n+     *\n+     * @param  {int} month\n+     * @return {array}\n+     */\n+    vm.getMonthData = function (month) {\n+      if (vm.calendar.days) {\n+        var iterator,\n+          dates = Object.keys(vm.calendar.days),\n+          date,\n+          length = dates.length,\n+          datesForTheMonth = [];\n+\n+        for (iterator = 0; iterator < length; iterator++) {\n+          date = new Date(parseInt(dates[iterator]));\n+          if (date.getMonth() === month) {\n+            datesForTheMonth.push(vm.calendar.days[dates[iterator]]);\n+          }\n+        }\n+\n+        return datesForTheMonth;\n+      }\n+    };\n+\n+    /**\n+     * Refresh all leave request and calendar data\n+     */\n+    vm.refresh = function () {\n+      vm.loading = true;\n+      loadLeaveRequest()\n+        .then(function () {\n+          vm.loading = false;\n+        });\n+    };\n+\n+    (function init() {\n+      vm.loading = true;\n+      $q.all([\n+        loadAbsencePeriods(),\n+        loadAbsenceTypes(),\n+        loadPublicHolidays(),\n+        loadStatuses(),\n+        loadDayTypes()\n+      ]).then(function () {\n+          vm.legendCollapsed = false;\n+          return loadLeaveRequest();\n+        })\n+        .then(function () {\n+          vm.loading = false;\n+        });\n+    })();\n+\n+    /**\n+     * Returns the leave request which is in range of the sent date\n+     *\n+     * @param  {string} date\n+     * @return {object}\n+     */\n+    function getLeaveRequest(date) {\n+      var iterator,\n+        length = leaveRequests.length,\n+        dates;\n+\n+      for (iterator = 0; iterator < length; iterator++) {\n+        dates = _.find(leaveRequests[iterator].dates, function (leaveRequestDate) {\n+          return moment(leaveRequestDate.date).isSame(date);\n+        });\n+\n+        if (dates) {\n+          return leaveRequests[iterator];\n+        }\n+      }\n+    }\n+\n+    /**\n+     * Returns the styles for a specific leaveRequest\n+     * which will be used in the view for each date\n+     *\n+     * @param  {object} leaveRequest\n+     * @return {object}\n+     */\n+    function getStyles(leaveRequest) {\n+      var status = leaveRequestStatuses[leaveRequest.status_id],\n+        absenceType;\n+\n+      if (status.name === 'waiting_approval'\n+        || status.name === 'approved'\n+        || status.name === 'admin_approved') {\n+        absenceType = _.find(vm.absenceTypes, function (absenceType) {\n+          return absenceType.id == leaveRequest.type_id;\n+        });\n+\n+        return {\n+          backgroundColor: absenceType.color,\n+          borderColor: absenceType.color\n+        };\n+      }\n+    }\n+\n+    /**\n+     * Returns whether a date is of a specific type\n+     * half_day_am or half_day_pm\n+     *\n+     * @param  {string} name\n+     * @param  {object} leaveRequest\n+     * @param  {string} date\n+     *\n+     * @return {boolean}\n+     */\n+    function isDayType(name, leaveRequest, date) {\n+      var dayType = dayTypes[name];\n+\n+      if (moment(date).isSame(leaveRequest.from_date)) {\n+        return dayType.value == leaveRequest.from_date_type;\n+      }\n+\n+      if (moment(date).isSame(leaveRequest.to_date)) {\n+        return dayType.value == leaveRequest.to_date_type;\n+      }\n+    }\n+\n+    /**\n+     * Returns whether a leaveRequest is pending approval\n+     *\n+     * @param  {object} leaveRequest\n+     * @return {boolean}\n+     */\n+    function isPendingApproval(leaveRequest) {\n+      var status = leaveRequestStatuses[leaveRequest.status_id];\n+\n+      return status.name === 'waiting_approval';\n+    }\n+\n+    /**\n+     * Loads the absence periods\n+     *\n+     * @return {Promise}\n+     */\n+    function loadAbsencePeriods() {\n+      return AbsencePeriod.all()\n+        .then(function (absencePeriods) {\n+          vm.absencePeriods = absencePeriods;\n+          vm.selectedPeriod = _.find(vm.absencePeriods, function (period) {\n+            return !!period.current;\n+          });\n+        });\n+    }\n+\n+    /**\n+     * Loads the absence types\n+     *\n+     * @return {Promise}\n+     */\n+    function loadAbsenceTypes() {\n+      return AbsenceType.all()\n+        .then(function (absenceTypes) {\n+          vm.absenceTypes = absenceTypes;\n+        });\n+    }\n+\n+    /**\n+     * Loads the calendar data\n+     *\n+     * @return {Promise}\n+     */\n+    function loadCalendar() {\n+      return Calendar.get(vm.contactId, vm.selectedPeriod.id)\n+        .then(function (calendar) {\n+          vm.calendar = setCalendarProps(calendar);\n+        });\n+    }\n+\n+    /**\n+     * Loads the leave request day types\n+     *\n+     * @return {Promise}\n+     */\n+    function loadDayTypes() {\n+      return OptionGroup.valuesOf('hrleaveandabsences_leave_request_day_type')\n+        .then(function (dayTypesData) {\n+          var iterator,\n+            length = dayTypesData.length,\n+            typesObj = {};\n+\n+          // convert to an object with name as key\n+          for (iterator = 0; iterator < length; iterator++) {\n+            typesObj[dayTypesData[iterator].name] = dayTypesData[iterator];\n+          }\n+          dayTypes = typesObj;\n+        });\n+    }\n+\n+    /**\n+     * Loads all the leave requests\n+     *\n+     * @return {Promise}\n+     */\n+    function loadLeaveRequest() {\n+      return LeaveRequest.all({\n+        contact_id: vm.contactId,\n+        from_date: {\n+          from: vm.selectedPeriod.start_date\n+        },\n+        to_date: {\n+          to: vm.selectedPeriod.end_date\n+        }\n+      }).then(function (leaveRequestsData) {\n+          leaveRequests = leaveRequestsData.list;\n+          return loadCalendar();\n+        });\n+    }\n+\n+    /**\n+     * Loads all the public holidays\n+     *\n+     * @return {Promise}\n+     */\n+    function loadPublicHolidays() {\n+      return PublicHoliday.all()\n+        .then(function (publicHolidaysData) {\n+          var iterator,\n+            length = publicHolidaysData.length,\n+            datesObj = {};\n+\n+          // convert to an object with time stamp as key\n+          for (iterator = 0; iterator < length; iterator++) {\n+            datesObj[new Date(publicHolidaysData[iterator].date).getTime()] = publicHolidaysData[iterator];\n+          }\n+\n+          publicHolidays = datesObj;\n+        });\n+    }\n+\n+    /**\n+     * Loads the status option values\n+     *\n+     * @return {Promise}\n+     */\n+    function loadStatuses() {\n+      return OptionGroup.valuesOf('hrleaveandabsences_leave_request_status')\n+        .then(function (statuses) {\n+          var iterator,\n+            length = statuses.length,\n+            statusesObj = {};\n+\n+          // convert to an object with value as key\n+          for (iterator = 0; iterator < length; iterator++) {\n+            statusesObj[statuses[iterator].value] = statuses[iterator];\n+          }\n+\n+          leaveRequestStatuses = statusesObj;\n+        });\n+    }\n \n     /**\n-     * Init code\n+     * Sets UI related properties(isWeekend, isNonWorkingDay etc)\n+     * to the calendar data\n+     *\n+     * @param  {object} calendar\n+     * @return {object}\n      */\n-    function init() {\n-      this.legendCollapsed = false;\n+    function setCalendarProps(calendar) {\n+      var iterator,\n+        dates = Object.keys(calendar.days),\n+        length = dates.length,\n+        dateObj,\n+        leaveRequest;\n+\n+      for (iterator = 0; iterator < length; iterator++) {","path":"uk.co.compucorp.civicrm.hrleaveandabsences/js/angular/src/leave-absences/my-leave/components/my-leave-calendar.js","position":null,"original_position":345,"commit_id":"1e7232f0a3317f10eda1349502885fc946ebe910","original_commit_id":"ad5ddb7555f4fd8033cc48cd6f2733319c223259","user":{"login":"AkA84","id":6400898,"avatar_url":"https://avatars.githubusercontent.com/u/6400898?v=3","gravatar_id":"","url":"https://api.github.com/users/AkA84","html_url":"https://github.com/AkA84","followers_url":"https://api.github.com/users/AkA84/followers","following_url":"https://api.github.com/users/AkA84/following{/other_user}","gists_url":"https://api.github.com/users/AkA84/gists{/gist_id}","starred_url":"https://api.github.com/users/AkA84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AkA84/subscriptions","organizations_url":"https://api.github.com/users/AkA84/orgs","repos_url":"https://api.github.com/users/AkA84/repos","events_url":"https://api.github.com/users/AkA84/events{/privacy}","received_events_url":"https://api.github.com/users/AkA84/received_events","type":"User","site_admin":false},"body":"Same thing as before, i think you can use functional programming style here as well","created_at":"2017-02-06T12:35:26Z","updated_at":"2017-02-06T12:36:30Z","html_url":"https://github.com/civicrm/civihr/pull/1410#discussion_r99576138","pull_request_url":"https://api.github.com/repos/civicrm/civihr/pulls/1410","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/comments/99576138"},"html":{"href":"https://github.com/civicrm/civihr/pull/1410#discussion_r99576138"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1410"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civihr/pulls/1410","id":104701500,"html_url":"https://github.com/civicrm/civihr/pull/1410","diff_url":"https://github.com/civicrm/civihr/pull/1410.diff","patch_url":"https://github.com/civicrm/civihr/pull/1410.patch","issue_url":"https://api.github.com/repos/civicrm/civihr/issues/1410","number":1410,"state":"open","locked":false,"title":"PCHR-1273: Calendar functionality, unit test","user":{"login":"deb1990","id":5058867,"avatar_url":"https://avatars.githubusercontent.com/u/5058867?v=3","gravatar_id":"","url":"https://api.github.com/users/deb1990","html_url":"https://github.com/deb1990","followers_url":"https://api.github.com/users/deb1990/followers","following_url":"https://api.github.com/users/deb1990/following{/other_user}","gists_url":"https://api.github.com/users/deb1990/gists{/gist_id}","starred_url":"https://api.github.com/users/deb1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deb1990/subscriptions","organizations_url":"https://api.github.com/users/deb1990/orgs","repos_url":"https://api.github.com/users/deb1990/repos","events_url":"https://api.github.com/users/deb1990/events{/privacy}","received_events_url":"https://api.github.com/users/deb1990/received_events","type":"User","site_admin":false},"body":"This PR (and https://github.com/compucorp/civihr-employee-portal-theme/pull/137) contains the dynamic data loading for the `my-leave-calendar` component and unit test cases.\r\n\r\n**Screengrab**\r\nhttp://recordit.co/LYlE4Mim0f\r\n\r\n**Note**\r\n1. The Legend is generated dynamically using `absenceTypes`. The styles for the legend are fetched from the `absenceTypes` and used as `inline styles`.\r\n\r\n2. 4 has been selected as the maximum number of months for the Months Multiselect.\r\n\r\n\r\n**Modifications**\r\n1. `Calendar`model : The structure of data has been changed from `Array` to `Object` with `timestamp` as the key. This is to efficiently get required date object without having to loop through all the records.\r\n2. `PublicHoliday` Model :  Logic optimisation\r\n3. `leave-request-data` : `dates` array added to all the records to match with actual API\r\n\r\n\r\n","created_at":"2017-02-05T14:35:02Z","updated_at":"2017-02-06T12:36:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9731adb8ab2cdd4825406b938d8501225372b0df","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civihr/pulls/1410/commits","review_comments_url":"https://api.github.com/repos/civicrm/civihr/pulls/1410/comments","review_comment_url":"https://api.github.com/repos/civicrm/civihr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civihr/issues/1410/comments","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/1e7232f0a3317f10eda1349502885fc946ebe910","head":{"label":"civicrm:PCHR-1273-my-leave-calendar","ref":"PCHR-1273-my-leave-calendar","sha":"1e7232f0a3317f10eda1349502885fc946ebe910","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"name":"civihr","full_name":"civicrm/civihr","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/civicrm/civihr","forks_url":"https://api.github.com/repos/civicrm/civihr/forks","keys_url":"https://api.github.com/repos/civicrm/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civihr/teams","hooks_url":"https://api.github.com/repos/civicrm/civihr/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civihr/events","assignees_url":"https://api.github.com/repos/civicrm/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civihr/tags","blobs_url":"https://api.github.com/repos/civicrm/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civihr/languages","stargazers_url":"https://api.github.com/repos/civicrm/civihr/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civihr/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civihr/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civihr/subscription","commits_url":"https://api.github.com/repos/civicrm/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civihr/merges","archive_url":"https://api.github.com/repos/civicrm/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civihr/downloads","issues_url":"https://api.github.com/repos/civicrm/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civihr/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2017-01-22T10:49:09Z","pushed_at":"2017-02-06T12:24:37Z","git_url":"git://github.com/civicrm/civihr.git","ssh_url":"git@github.com:civicrm/civihr.git","clone_url":"https://github.com/civicrm/civihr.git","svn_url":"https://github.com/civicrm/civihr","homepage":null,"size":39919,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":25,"forks":30,"open_issues":25,"watchers":7,"default_branch":"staging"}},"base":{"label":"civicrm:la-milestone-3","ref":"la-milestone-3","sha":"2e32becddd5d6affdaac476d6e839e736e71d14c","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"name":"civihr","full_name":"civicrm/civihr","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/civicrm/civihr","forks_url":"https://api.github.com/repos/civicrm/civihr/forks","keys_url":"https://api.github.com/repos/civicrm/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civihr/teams","hooks_url":"https://api.github.com/repos/civicrm/civihr/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civihr/events","assignees_url":"https://api.github.com/repos/civicrm/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civihr/tags","blobs_url":"https://api.github.com/repos/civicrm/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civihr/languages","stargazers_url":"https://api.github.com/repos/civicrm/civihr/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civihr/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civihr/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civihr/subscription","commits_url":"https://api.github.com/repos/civicrm/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civihr/merges","archive_url":"https://api.github.com/repos/civicrm/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civihr/downloads","issues_url":"https://api.github.com/repos/civicrm/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civihr/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2017-01-22T10:49:09Z","pushed_at":"2017-02-06T12:24:37Z","git_url":"git://github.com/civicrm/civihr.git","ssh_url":"git@github.com:civicrm/civihr.git","clone_url":"https://github.com/civicrm/civihr.git","svn_url":"https://github.com/civicrm/civihr","homepage":null,"size":39919,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":25,"forks":30,"open_issues":25,"watchers":7,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1410"},"html":{"href":"https://github.com/civicrm/civihr/pull/1410"},"issue":{"href":"https://api.github.com/repos/civicrm/civihr/issues/1410"},"comments":{"href":"https://api.github.com/repos/civicrm/civihr/issues/1410/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1410/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1410/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civihr/statuses/1e7232f0a3317f10eda1349502885fc946ebe910"}}}}
{"actor":{"display_login":"AkA84"}}