{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-libs/pulls/comments/239723590","pull_request_review_id":182585772,"id":239723590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTcyMzU5MA==","diff_hunk":"@@ -0,0 +1,14 @@\n+const Document = require('./Document')\n+\n+const schema = {\n+  doctype: 'io.cozy.apps',\n+  attributes: {}\n+}\n+\n+class Application extends Document {\n+  static get schema() {\n+    return schema\n+  }\n+}","path":"packages/cozy-doctypes/src/Application.js","position":12,"original_position":12,"commit_id":"b59a8ff2125614fc7af7d771e61650a54683fade","original_commit_id":"b59a8ff2125614fc7af7d771e61650a54683fade","user":{"login":"ptbrowne","id":465582,"node_id":"MDQ6VXNlcjQ2NTU4Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/465582?v=4","gravatar_id":"","url":"https://api.github.com/users/ptbrowne","html_url":"https://github.com/ptbrowne","followers_url":"https://api.github.com/users/ptbrowne/followers","following_url":"https://api.github.com/users/ptbrowne/following{/other_user}","gists_url":"https://api.github.com/users/ptbrowne/gists{/gist_id}","starred_url":"https://api.github.com/users/ptbrowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptbrowne/subscriptions","organizations_url":"https://api.github.com/users/ptbrowne/orgs","repos_url":"https://api.github.com/users/ptbrowne/repos","events_url":"https://api.github.com/users/ptbrowne/events{/privacy}","received_events_url":"https://api.github.com/users/ptbrowne/received_events","type":"User","site_admin":false},"body":"Instead of using a static getter, why not simply : \r\n\r\n```\r\nApplication.schema = {\r\n  doctype: 'io.cozy.apps'\r\n  attributes: {}\r\n}\r\n```","created_at":"2018-12-07T08:11:14Z","updated_at":"2018-12-07T08:11:15Z","html_url":"https://github.com/cozy/cozy-libs/pull/180#discussion_r239723590","pull_request_url":"https://api.github.com/repos/cozy/cozy-libs/pulls/180","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/comments/239723590"},"html":{"href":"https://github.com/cozy/cozy-libs/pull/180#discussion_r239723590"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/180"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-libs/pulls/180","id":236554576,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NTU0NTc2","html_url":"https://github.com/cozy/cozy-libs/pull/180","diff_url":"https://github.com/cozy/cozy-libs/pull/180.diff","patch_url":"https://github.com/cozy/cozy-libs/pull/180.patch","issue_url":"https://api.github.com/repos/cozy/cozy-libs/issues/180","number":180,"state":"open","locked":false,"title":"Add Application","user":{"login":"gregorylegarec","id":776764,"node_id":"MDQ6VXNlcjc3Njc2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/776764?v=4","gravatar_id":"","url":"https://api.github.com/users/gregorylegarec","html_url":"https://github.com/gregorylegarec","followers_url":"https://api.github.com/users/gregorylegarec/followers","following_url":"https://api.github.com/users/gregorylegarec/following{/other_user}","gists_url":"https://api.github.com/users/gregorylegarec/gists{/gist_id}","starred_url":"https://api.github.com/users/gregorylegarec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregorylegarec/subscriptions","organizations_url":"https://api.github.com/users/gregorylegarec/orgs","repos_url":"https://api.github.com/users/gregorylegarec/repos","events_url":"https://api.github.com/users/gregorylegarec/events{/privacy}","received_events_url":"https://api.github.com/users/gregorylegarec/received_events","type":"User","site_admin":false},"body":"The goal of this PR is to make the Application doctype's schema available\r\nfrom anywhere. We need it to instanciate CozyClient at least in Home,\r\nStore, and the Bar.\r\n\r\nThe idea is to just write :\r\n\r\n```js\r\nimport Application from 'cozy-doctypes/Application'\r\n// ...\r\nconst client = new CozyClient({\r\n  schema: {\r\n    app: Application.schema\r\n  }\r\n}\r\n```","created_at":"2018-12-06T14:45:31Z","updated_at":"2018-12-07T08:11:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54e83a919aacfa309f93483edc78e65b43d09759","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kosssi","id":1135513,"node_id":"MDQ6VXNlcjExMzU1MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1135513?v=4","gravatar_id":"","url":"https://api.github.com/users/kosssi","html_url":"https://github.com/kosssi","followers_url":"https://api.github.com/users/kosssi/followers","following_url":"https://api.github.com/users/kosssi/following{/other_user}","gists_url":"https://api.github.com/users/kosssi/gists{/gist_id}","starred_url":"https://api.github.com/users/kosssi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosssi/subscriptions","organizations_url":"https://api.github.com/users/kosssi/orgs","repos_url":"https://api.github.com/users/kosssi/repos","events_url":"https://api.github.com/users/kosssi/events{/privacy}","received_events_url":"https://api.github.com/users/kosssi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":964715761,"node_id":"MDU6TGFiZWw5NjQ3MTU3NjE=","url":"https://api.github.com/repos/cozy/cozy-libs/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-libs/pulls/180/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-libs/pulls/180/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-libs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-libs/issues/180/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-libs/statuses/b59a8ff2125614fc7af7d771e61650a54683fade","head":{"label":"gregorylegarec:feat/add-application","ref":"feat/add-application","sha":"b59a8ff2125614fc7af7d771e61650a54683fade","user":{"login":"gregorylegarec","id":776764,"node_id":"MDQ6VXNlcjc3Njc2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/776764?v=4","gravatar_id":"","url":"https://api.github.com/users/gregorylegarec","html_url":"https://github.com/gregorylegarec","followers_url":"https://api.github.com/users/gregorylegarec/followers","following_url":"https://api.github.com/users/gregorylegarec/following{/other_user}","gists_url":"https://api.github.com/users/gregorylegarec/gists{/gist_id}","starred_url":"https://api.github.com/users/gregorylegarec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregorylegarec/subscriptions","organizations_url":"https://api.github.com/users/gregorylegarec/orgs","repos_url":"https://api.github.com/users/gregorylegarec/repos","events_url":"https://api.github.com/users/gregorylegarec/events{/privacy}","received_events_url":"https://api.github.com/users/gregorylegarec/received_events","type":"User","site_admin":false},"repo":{"id":145002141,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMDIxNDE=","name":"cozy-libs","full_name":"gregorylegarec/cozy-libs","private":false,"owner":{"login":"gregorylegarec","id":776764,"node_id":"MDQ6VXNlcjc3Njc2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/776764?v=4","gravatar_id":"","url":"https://api.github.com/users/gregorylegarec","html_url":"https://github.com/gregorylegarec","followers_url":"https://api.github.com/users/gregorylegarec/followers","following_url":"https://api.github.com/users/gregorylegarec/following{/other_user}","gists_url":"https://api.github.com/users/gregorylegarec/gists{/gist_id}","starred_url":"https://api.github.com/users/gregorylegarec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregorylegarec/subscriptions","organizations_url":"https://api.github.com/users/gregorylegarec/orgs","repos_url":"https://api.github.com/users/gregorylegarec/repos","events_url":"https://api.github.com/users/gregorylegarec/events{/privacy}","received_events_url":"https://api.github.com/users/gregorylegarec/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gregorylegarec/cozy-libs","description":"This repository holds many NPM packages and other libraries used to build Cozy products and tools.","fork":true,"url":"https://api.github.com/repos/gregorylegarec/cozy-libs","forks_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/forks","keys_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/teams","hooks_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/hooks","issue_events_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/issues/events{/number}","events_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/events","assignees_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/assignees{/user}","branches_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/branches{/branch}","tags_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/tags","blobs_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/statuses/{sha}","languages_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/languages","stargazers_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/stargazers","contributors_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/contributors","subscribers_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/subscribers","subscription_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/subscription","commits_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/contents/{+path}","compare_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/merges","archive_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/downloads","issues_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/issues{/number}","pulls_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/pulls{/number}","milestones_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/milestones{/number}","notifications_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/labels{/name}","releases_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/releases{/id}","deployments_url":"https://api.github.com/repos/gregorylegarec/cozy-libs/deployments","created_at":"2018-08-16T14:51:11Z","updated_at":"2018-08-16T14:51:13Z","pushed_at":"2018-12-06T15:39:28Z","git_url":"git://github.com/gregorylegarec/cozy-libs.git","ssh_url":"git@github.com:gregorylegarec/cozy-libs.git","clone_url":"https://github.com/gregorylegarec/cozy-libs.git","svn_url":"https://github.com/gregorylegarec/cozy-libs","homepage":"","size":968,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cozy:master","ref":"master","sha":"5146142791155907e9c8f8c48b102384d889105b","user":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":137353599,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczNTM1OTk=","name":"cozy-libs","full_name":"cozy/cozy-libs","private":false,"owner":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cozy/cozy-libs","description":"This repository holds many NPM packages and other libraries used to build Cozy products and tools.","fork":false,"url":"https://api.github.com/repos/cozy/cozy-libs","forks_url":"https://api.github.com/repos/cozy/cozy-libs/forks","keys_url":"https://api.github.com/repos/cozy/cozy-libs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-libs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-libs/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-libs/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-libs/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-libs/events","assignees_url":"https://api.github.com/repos/cozy/cozy-libs/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-libs/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-libs/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-libs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-libs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-libs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-libs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-libs/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-libs/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-libs/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-libs/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-libs/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-libs/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-libs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-libs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-libs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-libs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-libs/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-libs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-libs/merges","archive_url":"https://api.github.com/repos/cozy/cozy-libs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-libs/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-libs/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-libs/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-libs/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-libs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-libs/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-libs/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-libs/deployments","created_at":"2018-06-14T12:10:47Z","updated_at":"2018-12-06T13:11:19Z","pushed_at":"2018-12-06T22:47:03Z","git_url":"git://github.com/cozy/cozy-libs.git","ssh_url":"git@github.com:cozy/cozy-libs.git","clone_url":"https://github.com/cozy/cozy-libs.git","svn_url":"https://github.com/cozy/cozy-libs","homepage":"","size":1315,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6,"open_issues":39,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/180"},"html":{"href":"https://github.com/cozy/cozy-libs/pull/180"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-libs/issues/180"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-libs/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-libs/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-libs/statuses/b59a8ff2125614fc7af7d771e61650a54683fade"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ptbrowne"}}