{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-bar/pulls/comments/123003782","pull_request_review_id":45167789,"id":123003782,"diff_hunk":"@@ -2,15 +2,47 @@ import deepClone from 'deep-clone'\n import deepEqual from 'deep-equal'\n \n import stack from '../lib/stack'\n-import addComingSoonApps from './comingSoon'\n \n import MENU_CONFIG from '../config/menu'\n \n const EXCLUDES = ['settings', 'onboarding']\n const CATEGORIES = ['cozy', 'partners', 'ptnb']\n \n+let cachedComingSoonApps\n+function fetchComingSoonApps () {\n+  if (cachedComingSoonApps) return Promise.resolve(cachedComingSoonApps)\n+  return stack.get.context()\n+    .then(context => {\n+      const comingSoonApps = context.data && context.data.attributes &&\n+        context.data.attributes['coming_soon'] &&\n+          Object.values(context.data.attributes['coming_soon']) || []\n+\n+      cachedComingSoonApps = comingSoonApps.map(app => {\n+        let icon\n+\n+        try {\n+          icon = app.slug && {\n+            cached: true,\n+            src: require(`../assets/icons/comingsoon/icon-${app.slug.toLowerCase()}.svg`)","path":"src/lib/config.js","position":26,"original_position":26,"commit_id":"eea00c0328c6e8369007456cd240cc1b6a9363fa","original_commit_id":"eea00c0328c6e8369007456cd240cc1b6a9363fa","user":{"login":"gregorylegarec","id":776764,"avatar_url":"https://avatars0.githubusercontent.com/u/776764?v=3","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":"@CPatchane What about `assets/icons/apps/` ?","created_at":"2017-06-20T15:08:03Z","updated_at":"2017-06-20T15:08:03Z","html_url":"https://github.com/cozy/cozy-bar/pull/63#discussion_r123003782","pull_request_url":"https://api.github.com/repos/cozy/cozy-bar/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/comments/123003782"},"html":{"href":"https://github.com/cozy/cozy-bar/pull/63#discussion_r123003782"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-bar/pulls/63","id":126543866,"html_url":"https://github.com/cozy/cozy-bar/pull/63","diff_url":"https://github.com/cozy/cozy-bar/pull/63.diff","patch_url":"https://github.com/cozy/cozy-bar/pull/63.patch","issue_url":"https://api.github.com/repos/cozy/cozy-bar/issues/63","number":63,"state":"open","locked":false,"title":"feat: manage Coming Soon Apps from context","user":{"login":"gregorylegarec","id":776764,"avatar_url":"https://avatars0.githubusercontent.com/u/776764?v=3","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":"My `cozy.yaml` looks like:\r\n```yaml\r\n# It is possible to customize some behaviors of cozy-stack in function of the\r\n# context of an instance (the context field of the settings document of this\r\n# instance). Here, the \"beta\" context is customized with.\r\ncontexts:\r\n  maif_fing:\r\n    # Redirect to a specific route of cozy-collect after the onboarding\r\n    onboarded_redirection: collect/#/discovery/?intro\r\n    # Redirect to the photos application after login\r\n    default_redirection: drive/#/files\r\n    # Allow to customize the cozy-bar link to the help\r\n    help_link: https://forum.cozy.io/\r\n    coming_soon:\r\n      store:\r\n        editor: 'Cozy'\r\n        name: 'Store'\r\n        slug: 'store'\r\n        category: 'cozy'\r\n      bank:\r\n        editor: 'Cozy'\r\n        name: 'Bank'\r\n        slug: 'bank'\r\n        category: 'partners'\r\n      sante:\r\n        editor: 'Cozy'\r\n        name: 'Santé'\r\n        slug: 'sante'\r\n        category: 'partners'\r\n```\r\nI am waiting for @nono to know if it is possible to specify a `default` context, when no `context` property is specified in the instance settings.","created_at":"2017-06-20T14:15:26Z","updated_at":"2017-06-20T15:08:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9db9e5d688e3d1596af9c9253a407e6da4bf8143","assignee":{"login":"CPatchane","id":10224453,"avatar_url":"https://avatars1.githubusercontent.com/u/10224453?v=3","gravatar_id":"","url":"https://api.github.com/users/CPatchane","html_url":"https://github.com/CPatchane","followers_url":"https://api.github.com/users/CPatchane/followers","following_url":"https://api.github.com/users/CPatchane/following{/other_user}","gists_url":"https://api.github.com/users/CPatchane/gists{/gist_id}","starred_url":"https://api.github.com/users/CPatchane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPatchane/subscriptions","organizations_url":"https://api.github.com/users/CPatchane/orgs","repos_url":"https://api.github.com/users/CPatchane/repos","events_url":"https://api.github.com/users/CPatchane/events{/privacy}","received_events_url":"https://api.github.com/users/CPatchane/received_events","type":"User","site_admin":false},"assignees":[{"login":"CPatchane","id":10224453,"avatar_url":"https://avatars1.githubusercontent.com/u/10224453?v=3","gravatar_id":"","url":"https://api.github.com/users/CPatchane","html_url":"https://github.com/CPatchane","followers_url":"https://api.github.com/users/CPatchane/followers","following_url":"https://api.github.com/users/CPatchane/following{/other_user}","gists_url":"https://api.github.com/users/CPatchane/gists{/gist_id}","starred_url":"https://api.github.com/users/CPatchane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPatchane/subscriptions","organizations_url":"https://api.github.com/users/CPatchane/orgs","repos_url":"https://api.github.com/users/CPatchane/repos","events_url":"https://api.github.com/users/CPatchane/events{/privacy}","received_events_url":"https://api.github.com/users/CPatchane/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"m4dz","id":471486,"avatar_url":"https://avatars3.githubusercontent.com/u/471486?v=3","gravatar_id":"","url":"https://api.github.com/users/m4dz","html_url":"https://github.com/m4dz","followers_url":"https://api.github.com/users/m4dz/followers","following_url":"https://api.github.com/users/m4dz/following{/other_user}","gists_url":"https://api.github.com/users/m4dz/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dz/subscriptions","organizations_url":"https://api.github.com/users/m4dz/orgs","repos_url":"https://api.github.com/users/m4dz/repos","events_url":"https://api.github.com/users/m4dz/events{/privacy}","received_events_url":"https://api.github.com/users/m4dz/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-bar/pulls/63/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-bar/pulls/63/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-bar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-bar/issues/63/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-bar/statuses/eea00c0328c6e8369007456cd240cc1b6a9363fa","head":{"label":"gregorylegarec:feat/commint-soon-from-context","ref":"feat/commint-soon-from-context","sha":"eea00c0328c6e8369007456cd240cc1b6a9363fa","user":{"login":"gregorylegarec","id":776764,"avatar_url":"https://avatars0.githubusercontent.com/u/776764?v=3","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":90394181,"name":"cozy-bar","full_name":"gregorylegarec/cozy-bar","owner":{"login":"gregorylegarec","id":776764,"avatar_url":"https://avatars0.githubusercontent.com/u/776764?v=3","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},"private":false,"html_url":"https://github.com/gregorylegarec/cozy-bar","description":"cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app","fork":true,"url":"https://api.github.com/repos/gregorylegarec/cozy-bar","forks_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/forks","keys_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/teams","hooks_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/hooks","issue_events_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/issues/events{/number}","events_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/events","assignees_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/assignees{/user}","branches_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/branches{/branch}","tags_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/tags","blobs_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/statuses/{sha}","languages_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/languages","stargazers_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/stargazers","contributors_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/contributors","subscribers_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/subscribers","subscription_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/subscription","commits_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/issues/comments{/number}","contents_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/contents/{+path}","compare_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/merges","archive_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/downloads","issues_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/issues{/number}","pulls_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/pulls{/number}","milestones_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/milestones{/number}","notifications_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/labels{/name}","releases_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/releases{/id}","deployments_url":"https://api.github.com/repos/gregorylegarec/cozy-bar/deployments","created_at":"2017-05-05T16:08:17Z","updated_at":"2017-05-05T16:08:18Z","pushed_at":"2017-06-20T14:45:59Z","git_url":"git://github.com/gregorylegarec/cozy-bar.git","ssh_url":"git@github.com:gregorylegarec/cozy-bar.git","clone_url":"https://github.com/gregorylegarec/cozy-bar.git","svn_url":"https://github.com/gregorylegarec/cozy-bar","homepage":null,"size":5847,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cozy:master","ref":"master","sha":"24a77d185dde37a3552483fa8cb3f7772f0a04d0","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars3.githubusercontent.com/u/7690525?v=3","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":79438272,"name":"cozy-bar","full_name":"cozy/cozy-bar","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars3.githubusercontent.com/u/7690525?v=3","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},"private":false,"html_url":"https://github.com/cozy/cozy-bar","description":"cozy-bar.js library, a small lib provided by cozy-stack to inject the Cozy-bar component into each app","fork":false,"url":"https://api.github.com/repos/cozy/cozy-bar","forks_url":"https://api.github.com/repos/cozy/cozy-bar/forks","keys_url":"https://api.github.com/repos/cozy/cozy-bar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-bar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-bar/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-bar/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-bar/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-bar/events","assignees_url":"https://api.github.com/repos/cozy/cozy-bar/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-bar/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-bar/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-bar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-bar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-bar/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-bar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-bar/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-bar/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-bar/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-bar/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-bar/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-bar/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-bar/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-bar/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-bar/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-bar/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-bar/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-bar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-bar/merges","archive_url":"https://api.github.com/repos/cozy/cozy-bar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-bar/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-bar/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-bar/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-bar/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-bar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-bar/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-bar/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-bar/deployments","created_at":"2017-01-19T09:40:51Z","updated_at":"2017-03-07T09:53:16Z","pushed_at":"2017-06-20T14:46:01Z","git_url":"git://github.com/cozy/cozy-bar.git","ssh_url":"git@github.com:cozy/cozy-bar.git","clone_url":"https://github.com/cozy/cozy-bar.git","svn_url":"https://github.com/cozy/cozy-bar","homepage":null,"size":5841,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/63"},"html":{"href":"https://github.com/cozy/cozy-bar/pull/63"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-bar/issues/63"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-bar/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-bar/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-bar/statuses/eea00c0328c6e8369007456cd240cc1b6a9363fa"}}}}
{"actor":{"display_login":"gregorylegarec"}}