GitHub PullRequestReviewCommentEvent at 2014-10-23 00:23:40
Repository: module.utils
Actor: mathieumg
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/my-koop/module.utils/pulls/comments/19253577","id":19253577,"diff_hunk":"@@ -1,13 +1,88 @@\n import utils = require(\"mykoop-utils\");\n+import _ = require(\"lodash\");\n \n-class MetaData implements utils.IMetaData {\n+class MetaData implements utils.MetaData {\n+  private metaData: any = {};\n \n-  generateRoute() {\n+  get() {\n+    return this.metaData;\n+  }\n+\n+  addData(path: string[], data: any): void;\n+  addData(path: string, data: any): void;\n+  addData(path: any, data: any): void {\n+    if(_.isString(path)) {\n+      path = [path];\n+    }\n+\n+    if(!_.isArray(path) || path.length < 1) {\n+      console.error(\"MetaData path must be an array of string of at least 1 element\");\n+      return;\n+    }\n+\n+    var dst = this.metaData;\n+    _.forEach(path, function(street) {\n+      if(!dst[street]) {\n+        dst[street] = {};\n+      }\n+      dst = dst[street];\n+    });\n \n+    dst = _.merge(dst,data);\n   }\n \n+  addRoute(options: utils.RouteMetaData) {\n+    if(!_.isArray(options.idPath) || options.idPath.length < 1) {\n+      console.error(\"MetaData idPath options must have idPath of type string[] with at least one\");\n+      return;\n+    }\n+\n+    var dataId = options.idPath.pop();\n+    var path = [\"routes\"];\n+    _.forEach(options.idPath, function(id){\n+      path.push(id);\n+      path.push(\"children\");\n+    });\n+    path.push(dataId);\n+\n+    var data: any = {};\n+\n+    if(options.path) {\n+      data.path = options.path;\n+    }\n \n+    if(options.name !== undefined) {\n+      if(options.name === null) {\n+        data.name = dataId;\n+      } else {\n+        data.name = options.name;\n+      }\n+    }\n+\n+    if(options.component){","path":"lib/metaData.ts","position":64,"original_position":64,"commit_id":"169c4e4a008bf5a78751b8fc861462cfac73a2ce","original_commit_id":"169c4e4a008bf5a78751b8fc861462cfac73a2ce","user":{"login":"mathieumg","id":1624812,"avatar_url":"https://avatars.githubusercontent.com/u/1624812?v=2","gravatar_id":"","url":"https://api.github.com/users/mathieumg","html_url":"https://github.com/mathieumg","followers_url":"https://api.github.com/users/mathieumg/followers","following_url":"https://api.github.com/users/mathieumg/following{/other_user}","gists_url":"https://api.github.com/users/mathieumg/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieumg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieumg/subscriptions","organizations_url":"https://api.github.com/users/mathieumg/orgs","repos_url":"https://api.github.com/users/mathieumg/repos","events_url":"https://api.github.com/users/mathieumg/events{/privacy}","received_events_url":"https://api.github.com/users/mathieumg/received_events","type":"User","site_admin":false},"body":"Missing whitespace. ;) ","created_at":"2014-10-23T00:23:40Z","updated_at":"2014-10-23T00:23:40Z","html_url":"https://github.com/my-koop/module.utils/pull/2#discussion_r19253577","pull_request_url":"https://api.github.com/repos/my-koop/module.utils/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/my-koop/module.utils/pulls/comments/19253577"},"html":{"href":"https://github.com/my-koop/module.utils/pull/2#discussion_r19253577"},"pull_request":{"href":"https://api.github.com/repos/my-koop/module.utils/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/my-koop/module.utils/pulls/2","id":23197219,"html_url":"https://github.com/my-koop/module.utils/pull/2","diff_url":"https://github.com/my-koop/module.utils/pull/2.diff","patch_url":"https://github.com/my-koop/module.utils/pull/2.patch","issue_url":"https://api.github.com/repos/my-koop/module.utils/issues/2","number":2,"state":"open","locked":false,"title":"Mike route metadata","user":{"login":"Cellule","id":4157103,"avatar_url":"https://avatars.githubusercontent.com/u/4157103?v=2","gravatar_id":"","url":"https://api.github.com/users/Cellule","html_url":"https://github.com/Cellule","followers_url":"https://api.github.com/users/Cellule/followers","following_url":"https://api.github.com/users/Cellule/following{/other_user}","gists_url":"https://api.github.com/users/Cellule/gists{/gist_id}","starred_url":"https://api.github.com/users/Cellule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cellule/subscriptions","organizations_url":"https://api.github.com/users/Cellule/orgs","repos_url":"https://api.github.com/users/Cellule/repos","events_url":"https://api.github.com/users/Cellule/events{/privacy}","received_events_url":"https://api.github.com/users/Cellule/received_events","type":"User","site_admin":false},"body":"implementation of utility to add meta data and route meta data","created_at":"2014-10-22T23:17:49Z","updated_at":"2014-10-23T00:23:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe6a6058c72bc25e0780a5607eb6f5ab7f1c24c2","assignee":{"login":"mathieumg","id":1624812,"avatar_url":"https://avatars.githubusercontent.com/u/1624812?v=2","gravatar_id":"","url":"https://api.github.com/users/mathieumg","html_url":"https://github.com/mathieumg","followers_url":"https://api.github.com/users/mathieumg/followers","following_url":"https://api.github.com/users/mathieumg/following{/other_user}","gists_url":"https://api.github.com/users/mathieumg/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieumg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieumg/subscriptions","organizations_url":"https://api.github.com/users/mathieumg/orgs","repos_url":"https://api.github.com/users/mathieumg/repos","events_url":"https://api.github.com/users/mathieumg/events{/privacy}","received_events_url":"https://api.github.com/users/mathieumg/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/my-koop/module.utils/pulls/2/commits","review_comments_url":"https://api.github.com/repos/my-koop/module.utils/pulls/2/comments","review_comment_url":"https://api.github.com/repos/my-koop/module.utils/pulls/comments/{number}","comments_url":"https://api.github.com/repos/my-koop/module.utils/issues/2/comments","statuses_url":"https://api.github.com/repos/my-koop/module.utils/statuses/169c4e4a008bf5a78751b8fc861462cfac73a2ce","head":{"label":"my-koop:mike_route_metadata","ref":"mike_route_metadata","sha":"169c4e4a008bf5a78751b8fc861462cfac73a2ce","user":{"login":"my-koop","id":8674744,"avatar_url":"https://avatars.githubusercontent.com/u/8674744?v=2","gravatar_id":"","url":"https://api.github.com/users/my-koop","html_url":"https://github.com/my-koop","followers_url":"https://api.github.com/users/my-koop/followers","following_url":"https://api.github.com/users/my-koop/following{/other_user}","gists_url":"https://api.github.com/users/my-koop/gists{/gist_id}","starred_url":"https://api.github.com/users/my-koop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/my-koop/subscriptions","organizations_url":"https://api.github.com/users/my-koop/orgs","repos_url":"https://api.github.com/users/my-koop/repos","events_url":"https://api.github.com/users/my-koop/events{/privacy}","received_events_url":"https://api.github.com/users/my-koop/received_events","type":"Organization","site_admin":false},"repo":{"id":25410463,"name":"module.utils","full_name":"my-koop/module.utils","owner":{"login":"my-koop","id":8674744,"avatar_url":"https://avatars.githubusercontent.com/u/8674744?v=2","gravatar_id":"","url":"https://api.github.com/users/my-koop","html_url":"https://github.com/my-koop","followers_url":"https://api.github.com/users/my-koop/followers","following_url":"https://api.github.com/users/my-koop/following{/other_user}","gists_url":"https://api.github.com/users/my-koop/gists{/gist_id}","starred_url":"https://api.github.com/users/my-koop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/my-koop/subscriptions","organizations_url":"https://api.github.com/users/my-koop/orgs","repos_url":"https://api.github.com/users/my-koop/repos","events_url":"https://api.github.com/users/my-koop/events{/privacy}","received_events_url":"https://api.github.com/users/my-koop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/my-koop/module.utils","description":"Utilities used across my-koop","fork":false,"url":"https://api.github.com/repos/my-koop/module.utils","forks_url":"https://api.github.com/repos/my-koop/module.utils/forks","keys_url":"https://api.github.com/repos/my-koop/module.utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/my-koop/module.utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/my-koop/module.utils/teams","hooks_url":"https://api.github.com/repos/my-koop/module.utils/hooks","issue_events_url":"https://api.github.com/repos/my-koop/module.utils/issues/events{/number}","events_url":"https://api.github.com/repos/my-koop/module.utils/events","assignees_url":"https://api.github.com/repos/my-koop/module.utils/assignees{/user}","branches_url":"https://api.github.com/repos/my-koop/module.utils/branches{/branch}","tags_url":"https://api.github.com/repos/my-koop/module.utils/tags","blobs_url":"https://api.github.com/repos/my-koop/module.utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/my-koop/module.utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/my-koop/module.utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/my-koop/module.utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/my-koop/module.utils/statuses/{sha}","languages_url":"https://api.github.com/repos/my-koop/module.utils/languages","stargazers_url":"https://api.github.com/repos/my-koop/module.utils/stargazers","contributors_url":"https://api.github.com/repos/my-koop/module.utils/contributors","subscribers_url":"https://api.github.com/repos/my-koop/module.utils/subscribers","subscription_url":"https://api.github.com/repos/my-koop/module.utils/subscription","commits_url":"https://api.github.com/repos/my-koop/module.utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/my-koop/module.utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/my-koop/module.utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/my-koop/module.utils/issues/comments/{number}","contents_url":"https://api.github.com/repos/my-koop/module.utils/contents/{+path}","compare_url":"https://api.github.com/repos/my-koop/module.utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/my-koop/module.utils/merges","archive_url":"https://api.github.com/repos/my-koop/module.utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/my-koop/module.utils/downloads","issues_url":"https://api.github.com/repos/my-koop/module.utils/issues{/number}","pulls_url":"https://api.github.com/repos/my-koop/module.utils/pulls{/number}","milestones_url":"https://api.github.com/repos/my-koop/module.utils/milestones{/number}","notifications_url":"https://api.github.com/repos/my-koop/module.utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/my-koop/module.utils/labels{/name}","releases_url":"https://api.github.com/repos/my-koop/module.utils/releases{/id}","created_at":"2014-10-18T21:18:40Z","updated_at":"2014-10-21T13:10:24Z","pushed_at":"2014-10-22T23:13:51Z","git_url":"git://github.com/my-koop/module.utils.git","ssh_url":"git@github.com:my-koop/module.utils.git","clone_url":"https://github.com/my-koop/module.utils.git","svn_url":"https://github.com/my-koop/module.utils","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"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":"my-koop:master","ref":"master","sha":"75b3ea2e79253479490f738d1df1fb1cfc7cf854","user":{"login":"my-koop","id":8674744,"avatar_url":"https://avatars.githubusercontent.com/u/8674744?v=2","gravatar_id":"","url":"https://api.github.com/users/my-koop","html_url":"https://github.com/my-koop","followers_url":"https://api.github.com/users/my-koop/followers","following_url":"https://api.github.com/users/my-koop/following{/other_user}","gists_url":"https://api.github.com/users/my-koop/gists{/gist_id}","starred_url":"https://api.github.com/users/my-koop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/my-koop/subscriptions","organizations_url":"https://api.github.com/users/my-koop/orgs","repos_url":"https://api.github.com/users/my-koop/repos","events_url":"https://api.github.com/users/my-koop/events{/privacy}","received_events_url":"https://api.github.com/users/my-koop/received_events","type":"Organization","site_admin":false},"repo":{"id":25410463,"name":"module.utils","full_name":"my-koop/module.utils","owner":{"login":"my-koop","id":8674744,"avatar_url":"https://avatars.githubusercontent.com/u/8674744?v=2","gravatar_id":"","url":"https://api.github.com/users/my-koop","html_url":"https://github.com/my-koop","followers_url":"https://api.github.com/users/my-koop/followers","following_url":"https://api.github.com/users/my-koop/following{/other_user}","gists_url":"https://api.github.com/users/my-koop/gists{/gist_id}","starred_url":"https://api.github.com/users/my-koop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/my-koop/subscriptions","organizations_url":"https://api.github.com/users/my-koop/orgs","repos_url":"https://api.github.com/users/my-koop/repos","events_url":"https://api.github.com/users/my-koop/events{/privacy}","received_events_url":"https://api.github.com/users/my-koop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/my-koop/module.utils","description":"Utilities used across my-koop","fork":false,"url":"https://api.github.com/repos/my-koop/module.utils","forks_url":"https://api.github.com/repos/my-koop/module.utils/forks","keys_url":"https://api.github.com/repos/my-koop/module.utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/my-koop/module.utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/my-koop/module.utils/teams","hooks_url":"https://api.github.com/repos/my-koop/module.utils/hooks","issue_events_url":"https://api.github.com/repos/my-koop/module.utils/issues/events{/number}","events_url":"https://api.github.com/repos/my-koop/module.utils/events","assignees_url":"https://api.github.com/repos/my-koop/module.utils/assignees{/user}","branches_url":"https://api.github.com/repos/my-koop/module.utils/branches{/branch}","tags_url":"https://api.github.com/repos/my-koop/module.utils/tags","blobs_url":"https://api.github.com/repos/my-koop/module.utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/my-koop/module.utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/my-koop/module.utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/my-koop/module.utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/my-koop/module.utils/statuses/{sha}","languages_url":"https://api.github.com/repos/my-koop/module.utils/languages","stargazers_url":"https://api.github.com/repos/my-koop/module.utils/stargazers","contributors_url":"https://api.github.com/repos/my-koop/module.utils/contributors","subscribers_url":"https://api.github.com/repos/my-koop/module.utils/subscribers","subscription_url":"https://api.github.com/repos/my-koop/module.utils/subscription","commits_url":"https://api.github.com/repos/my-koop/module.utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/my-koop/module.utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/my-koop/module.utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/my-koop/module.utils/issues/comments/{number}","contents_url":"https://api.github.com/repos/my-koop/module.utils/contents/{+path}","compare_url":"https://api.github.com/repos/my-koop/module.utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/my-koop/module.utils/merges","archive_url":"https://api.github.com/repos/my-koop/module.utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/my-koop/module.utils/downloads","issues_url":"https://api.github.com/repos/my-koop/module.utils/issues{/number}","pulls_url":"https://api.github.com/repos/my-koop/module.utils/pulls{/number}","milestones_url":"https://api.github.com/repos/my-koop/module.utils/milestones{/number}","notifications_url":"https://api.github.com/repos/my-koop/module.utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/my-koop/module.utils/labels{/name}","releases_url":"https://api.github.com/repos/my-koop/module.utils/releases{/id}","created_at":"2014-10-18T21:18:40Z","updated_at":"2014-10-21T13:10:24Z","pushed_at":"2014-10-22T23:13:51Z","git_url":"git://github.com/my-koop/module.utils.git","ssh_url":"git@github.com:my-koop/module.utils.git","clone_url":"https://github.com/my-koop/module.utils.git","svn_url":"https://github.com/my-koop/module.utils","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"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/my-koop/module.utils/pulls/2"},"html":{"href":"https://github.com/my-koop/module.utils/pull/2"},"issue":{"href":"https://api.github.com/repos/my-koop/module.utils/issues/2"},"comments":{"href":"https://api.github.com/repos/my-koop/module.utils/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/my-koop/module.utils/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/my-koop/module.utils/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/my-koop/module.utils/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/my-koop/module.utils/statuses/169c4e4a008bf5a78751b8fc861462cfac73a2ce"}}}}