GitHub PullRequestReviewCommentEvent at 2014-09-24 22:52:19
Repository: encore-ui
Actor: halkon
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/18005843","id":18005843,"diff_hunk":"@@ -0,0 +1,271 @@\n+angular.module('encore.ui.rxAppRoutes', ['encore.ui.rxEnvironment'])\n+/**\n+* @ngdoc service\n+* @name encore.ui.rxAppRoutes:urlUtils\n+* @description\n+* Set of utility functions used by rxAppRoutes to break apart/compare URLs\n+*/\n+.service('urlUtils', function ($location, rxEnvironmentUrlFilter, $interpolate, $route) {\n+    // remove any preceding # and / from the URL for cleaner comparison\n+    this.stripLeadingChars = function (url) {\n+        // http://regexr.com/39coc\n+        var leadingChars = /^((?:\\/|#)+)/;\n+\n+        return url.replace(leadingChars, '');\n+    };\n+\n+    // remove any trailing /'s from the URL\n+    this.stripTrailingSlash = function (url) {\n+        // Match a forward slash / at the end of the string ($)\n+        var trailingSlash = /\\/$/;\n+\n+        return url.replace(trailingSlash, '');\n+    };\n+\n+    // Given a URL, split it on '/' and return all the non-empty components\n+    this.getChunks = function (url) {\n+        if (!_.isString(url)) {\n+            return [''];\n+        }\n+        return _.filter(url.split('/'), function (chunk) {\n+            return chunk !== '';\n+        });\n+    };\n+\n+    // get the current path, adding the <base> path if neeeded\n+    //\n+    // @example\n+    // if the current page url is 'http://localhost:9000/encore-ui/#/overviewPage#bookmark?book=harry%20potter'\n+    // and the page contains a <base href=\"encore-ui\"> tag\n+    // getCurrentPath() would return '/encore-ui/overviewPage'\n+    this.getCurrentPathChunks = function () {\n+        var fullPath;\n+        var base = document.getElementsByTagName('base');\n+        var basePath = '';\n+\n+        if (base.length > 0) {\n+            basePath = base[0].getAttribute('href');\n+\n+            // remove trailing '/' if present\n+            basePath = this.stripTrailingSlash(basePath);\n+        }\n+\n+        fullPath = basePath + $location.path();\n+        fullPath = this.stripLeadingChars(fullPath);\n+\n+        return this.getChunks(fullPath);\n+    };\n+\n+    // get the url defined in the route by removing the hash tag, leading slashes and query string\n+    // e.g. '/#/my/url?param=1' -> 'my/url'\n+    this.getItemUrl = function (item) {\n+        if (!_.isString(item.url)) {\n+            return undefined;\n+        }\n+\n+        // remove query string\n+        var itemUrl = item.url.split('?')[0];\n+        itemUrl = this.stripLeadingChars(itemUrl);\n+\n+        return itemUrl;\n+    };\n+\n+    // For a given route item, grab its defined URL, and see\n+    // if it matches the currentPathChunks\n+    this.isActive = function (item, currentPathChunks) {\n+        var itemUrlChunks = this.getChunks(this.getItemUrl(item));\n+        var numChunks = itemUrlChunks.length;\n+\n+        // check against the path and the hash\n+        // (in case the difference is the 'hash' like on the encore-ui demo page)\n+        var pathMatches = this.matchesSubChunks(currentPathChunks, itemUrlChunks, numChunks);\n+        if (!pathMatches) {\n+            pathMatches = this.matchesSubChunks(this.getChunks($location.hash()), itemUrlChunks, numChunks);\n+        }\n+\n+        // if current item not active, check if any children are active\n+        // This requires that `isActive` was called on all the children beforehand\n+        if (!pathMatches && item.children) {\n+            pathMatches = _.any(item.children, 'active');\n+        }\n+\n+        return pathMatches;\n+    };\n+\n+    this.buildUrl = function (url) {\n+        // sometimes links don't have URLs defined, so we need to exit before $interpolate throws an error\n+        if (_.isUndefined(url)) {\n+            return url;\n+        }\n+\n+        // run the href through rxEnvironmentUrl in case it's defined as such\n+        url = rxEnvironmentUrlFilter(url);\n+\n+        if ($route.current) {\n+            // convert any nested expressions to defined route params\n+            url = $interpolate(url)($route.current.pathParams);\n+        }\n+\n+        return url;\n+    };\n+\n+    // Given two sets of chunks, check if the first `numChunks` of `firstChunks`\n+    // matches `subChunks`\n+    this.matchesSubChunks = function (firstChunks, subChunks, numChunks) {\n+        return _.isEqual(firstChunks.slice(0, numChunks), subChunks);\n+    };\n+})\n+/**\n+* @ngdoc interface\n+* @name encore.ui.rxApp:AppRoutes\n+* @description\n+* Manages page routes, building urls and marking them as active on route change\n+*/\n+.factory('rxAppRoutes', function ($rootScope, $log, urlUtils, $q) {\n+    var AppRoutes = function (routes) {\n+        routes = routes || [];\n+        // we need to get the current path on page load\n+        var currentPathChunks = urlUtils.getCurrentPathChunks();\n+        var loadingDeferred = $q.defer();\n+\n+        // if the routes were already passed in, then we can immediately\n+        // resolve the promise\n+        if (routes.length > 0) {\n+            loadingDeferred.resolve(routes);\n+        }\n+\n+        var setDynamicProperties = function (routes) {\n+            _.each(routes, function (route) {\n+                // build out url for current route\n+                route.url = urlUtils.buildUrl(route.href);\n+\n+                // check if any children exist, if so, build their URLs as well\n+                if (route.children) {\n+                    route.children = setDynamicProperties(route.children);\n+                }\n+\n+                // set active state (this needs to go after the recursion,\n+                // so that the URL is built for all the children)\n+                route.active = urlUtils.isActive(route, currentPathChunks);\n+            });\n+\n+            return routes;\n+        };\n+\n+        var getRouteIndex = function (key, routes) {\n+            var routeIndex;\n+            var routeAlreadyFound = false;\n+\n+            _.forEach(routes, function (route, index) {\n+                var foundThisTime = false;\n+                if (route.key === key) {\n+                    routeIndex = [index];\n+                    foundThisTime = true;\n+                } else if ('children' in route) {\n+                    // if there are children in the route, we need to search through them as well\n+                    var childIndex = getRouteIndex(key, route.children);\n+                    if (childIndex) {\n+                        routeIndex = [index].concat(childIndex);\n+                        foundThisTime = true;\n+                    }\n+                }\n+                if (foundThisTime) {\n+                    if (routeAlreadyFound) {\n+                        $log.warn('Duplicate routes found for key: ' + key);\n+                    } else {\n+                        routeAlreadyFound = true;\n+                    }\n+                }\n+            });\n+\n+            return routeIndex;\n+        };\n+\n+        var updateRouteByIndex = function (indexes, routeInfo, routes, level) {\n+            var route = routes[indexes[0]];\n+\n+            if (level < indexes.length - 1) {\n+                // if there's more than one index, we need to recurse down a level\n+                route.children = updateRouteByIndex(indexes.slice(1), routeInfo, route.children, level + 1);\n+            } else {\n+                _.assign(route, routeInfo);\n+            }\n+\n+            return routes;\n+        };\n+\n+        $rootScope.$on('$locationChangeSuccess', function () {\n+            // NOTE: currentPath MUST be updated before routes\n+            currentPathChunks = urlUtils.getCurrentPathChunks();\n+\n+            routes = setDynamicProperties(routes);\n+        });\n+\n+        return {\n+            /**\n+             * Finds the indexes/path to a route. Will return last match if duplicate keys exist\n+             * @see setRouteByKey for actual use\n+             * @param  {string} key Route Key\n+             * @example\n+             *     var myRouteIndex = rxAppRoutes.getIndexByKey('myKey'); // [0, 2, 0]\n+             * @return {array|undefined} array of indexes describing path to route (or undefined if not found)\n+             */\n+            getIndexByKey: function (key) {\n+                var deferred = $q.defer();\n+\n+                loadingDeferred.promise.then(function () {\n+                    var routeIndex = getRouteIndex(key, routes);\n+\n+                    if (_.isUndefined(routeIndex)) {\n+                        $log.debug('Could not find route by key: ', key);\n+                        deferred.reject();\n+                    }\n+\n+                    deferred.resolve(routeIndex);","path":"src/rxAppRoutes/rxAppRoutes.js","position":224,"original_position":224,"commit_id":"d4bf710b7c6f519c878b0226feba853e3e300c75","original_commit_id":"d4bf710b7c6f519c878b0226feba853e3e300c75","user":{"login":"halkon","id":1437154,"avatar_url":"https://avatars.githubusercontent.com/u/1437154?v=2","gravatar_id":"","url":"https://api.github.com/users/halkon","html_url":"https://github.com/halkon","followers_url":"https://api.github.com/users/halkon/followers","following_url":"https://api.github.com/users/halkon/following{/other_user}","gists_url":"https://api.github.com/users/halkon/gists{/gist_id}","starred_url":"https://api.github.com/users/halkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halkon/subscriptions","organizations_url":"https://api.github.com/users/halkon/orgs","repos_url":"https://api.github.com/users/halkon/repos","events_url":"https://api.github.com/users/halkon/events{/privacy}","received_events_url":"https://api.github.com/users/halkon/received_events","type":"User","site_admin":false},"body":":+1: Double Promise","created_at":"2014-09-24T22:52:19Z","updated_at":"2014-09-24T22:52:19Z","html_url":"https://github.com/rackerlabs/encore-ui/pull/540#discussion_r18005843","pull_request_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/18005843"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/540#discussion_r18005843"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540","id":21394716,"html_url":"https://github.com/rackerlabs/encore-ui/pull/540","diff_url":"https://github.com/rackerlabs/encore-ui/pull/540.diff","patch_url":"https://github.com/rackerlabs/encore-ui/pull/540.patch","issue_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/540","number":540,"state":"open","locked":false,"title":"470 External Nav","user":{"login":"klamping","id":706039,"avatar_url":"https://avatars.githubusercontent.com/u/706039?v=2","gravatar_id":"","url":"https://api.github.com/users/klamping","html_url":"https://github.com/klamping","followers_url":"https://api.github.com/users/klamping/followers","following_url":"https://api.github.com/users/klamping/following{/other_user}","gists_url":"https://api.github.com/users/klamping/gists{/gist_id}","starred_url":"https://api.github.com/users/klamping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klamping/subscriptions","organizations_url":"https://api.github.com/users/klamping/orgs","repos_url":"https://api.github.com/users/klamping/repos","events_url":"https://api.github.com/users/klamping/events{/privacy}","received_events_url":"https://api.github.com/users/klamping/received_events","type":"User","site_admin":false},"body":"This brings in the initial work to have rxApp pull menu data from an external source.","created_at":"2014-09-17T20:43:58Z","updated_at":"2014-09-24T22:52:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97474fd6cd503b2063be8f9bcb7d9738eaf258b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/540/comments","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/d4bf710b7c6f519c878b0226feba853e3e300c75","head":{"label":"rackerlabs:470-external-nav","ref":"470-external-nav","sha":"d4bf710b7c6f519c878b0226feba853e3e300c75","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=2","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":11432401,"name":"encore-ui","full_name":"rackerlabs/encore-ui","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=2","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/encore-ui","description":"UI Framework for Encore","fork":false,"url":"https://api.github.com/repos/rackerlabs/encore-ui","forks_url":"https://api.github.com/repos/rackerlabs/encore-ui/forks","keys_url":"https://api.github.com/repos/rackerlabs/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/encore-ui/teams","hooks_url":"https://api.github.com/repos/rackerlabs/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/encore-ui/events","assignees_url":"https://api.github.com/repos/rackerlabs/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/tags","blobs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/encore-ui/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscription","commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/encore-ui/merges","archive_url":"https://api.github.com/repos/rackerlabs/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/encore-ui/downloads","issues_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/encore-ui/releases{/id}","created_at":"2013-07-15T20:06:52Z","updated_at":"2014-09-02T18:07:10Z","pushed_at":"2014-09-24T19:08:24Z","git_url":"git://github.com/rackerlabs/encore-ui.git","ssh_url":"git@github.com:rackerlabs/encore-ui.git","clone_url":"https://github.com/rackerlabs/encore-ui.git","svn_url":"https://github.com/rackerlabs/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":23872,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":62,"forks":15,"open_issues":62,"watchers":19,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"cf1f9d3c3b98def350c5c1949afbc977f797ec8f","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=2","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":11432401,"name":"encore-ui","full_name":"rackerlabs/encore-ui","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=2","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/encore-ui","description":"UI Framework for Encore","fork":false,"url":"https://api.github.com/repos/rackerlabs/encore-ui","forks_url":"https://api.github.com/repos/rackerlabs/encore-ui/forks","keys_url":"https://api.github.com/repos/rackerlabs/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/encore-ui/teams","hooks_url":"https://api.github.com/repos/rackerlabs/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/encore-ui/events","assignees_url":"https://api.github.com/repos/rackerlabs/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/tags","blobs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/encore-ui/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscription","commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/encore-ui/merges","archive_url":"https://api.github.com/repos/rackerlabs/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/encore-ui/downloads","issues_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/encore-ui/releases{/id}","created_at":"2013-07-15T20:06:52Z","updated_at":"2014-09-02T18:07:10Z","pushed_at":"2014-09-24T19:08:24Z","git_url":"git://github.com/rackerlabs/encore-ui.git","ssh_url":"git@github.com:rackerlabs/encore-ui.git","clone_url":"https://github.com/rackerlabs/encore-ui.git","svn_url":"https://github.com/rackerlabs/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":23872,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":62,"forks":15,"open_issues":62,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/540"},"issue":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/540"},"comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/540/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/540/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/d4bf710b7c6f519c878b0226feba853e3e300c75"}}}}