{"action":"created","comment":{"url":"https://api.github.com/repos/1024pix/pix/pulls/comments/227763515","pull_request_review_id":167876470,"id":227763515,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzc2MzUxNQ==","diff_hunk":"@@ -31,6 +31,22 @@ exports.register = (server, options, next) => {\n         ]\n       }\n     },\n+    {\n+      method: 'GET',\n+      path: '/api/organizations/{id}',\n+      config: {\n+        pre: [{\n+          method: securityController.checkUserHasRolePixMaster,\n+          assign: 'hasRolePixMaster'\n+        }],\n+        handler: organisationController.getOrganizationDetails,\n+        tags: ['api'],","path":"api/lib/application/organizations/index.js","position":13,"original_position":13,"commit_id":"54d39ba386caee846ae9996eec43e4c65404fc12","original_commit_id":"54d39ba386caee846ae9996eec43e4c65404fc12","user":{"login":"mlaurent","id":34855127,"node_id":"MDQ6VXNlcjM0ODU1MTI3","avatar_url":"https://avatars2.githubusercontent.com/u/34855127?v=4","gravatar_id":"","url":"https://api.github.com/users/mlaurent","html_url":"https://github.com/mlaurent","followers_url":"https://api.github.com/users/mlaurent/followers","following_url":"https://api.github.com/users/mlaurent/following{/other_user}","gists_url":"https://api.github.com/users/mlaurent/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaurent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaurent/subscriptions","organizations_url":"https://api.github.com/users/mlaurent/orgs","repos_url":"https://api.github.com/users/mlaurent/repos","events_url":"https://api.github.com/users/mlaurent/events{/privacy}","received_events_url":"https://api.github.com/users/mlaurent/received_events","type":"User","site_admin":false},"body":"Il me semble qu'on doit aussi mettre dans les tags, le \"context\" (ici, \"organizations\")","created_at":"2018-10-24T12:22:35Z","updated_at":"2018-10-24T12:39:59Z","html_url":"https://github.com/1024pix/pix/pull/239#discussion_r227763515","pull_request_url":"https://api.github.com/repos/1024pix/pix/pulls/239","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/1024pix/pix/pulls/comments/227763515"},"html":{"href":"https://github.com/1024pix/pix/pull/239#discussion_r227763515"},"pull_request":{"href":"https://api.github.com/repos/1024pix/pix/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/1024pix/pix/pulls/239","id":224727476,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NzI3NDc2","html_url":"https://github.com/1024pix/pix/pull/239","diff_url":"https://github.com/1024pix/pix/pull/239.diff","patch_url":"https://github.com/1024pix/pix/pull/239.patch","issue_url":"https://api.github.com/repos/1024pix/pix/issues/239","number":239,"state":"open","locked":false,"title":"[#242] [FEATURE] Ajout du endpoint GET /organizations/{id} qui permet à un Pix Master de récupérer le détail d'une organisation (PA-50).","user":{"login":"jbuget","id":265963,"node_id":"MDQ6VXNlcjI2NTk2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/265963?v=4","gravatar_id":"","url":"https://api.github.com/users/jbuget","html_url":"https://github.com/jbuget","followers_url":"https://api.github.com/users/jbuget/followers","following_url":"https://api.github.com/users/jbuget/following{/other_user}","gists_url":"https://api.github.com/users/jbuget/gists{/gist_id}","starred_url":"https://api.github.com/users/jbuget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbuget/subscriptions","organizations_url":"https://api.github.com/users/jbuget/orgs","repos_url":"https://api.github.com/users/jbuget/repos","events_url":"https://api.github.com/users/jbuget/events{/privacy}","received_events_url":"https://api.github.com/users/jbuget/received_events","type":"User","site_admin":false},"body":"### 🌈 Besoin fonctionnel\r\n\r\nApplication cible : Pix Admin\r\n\r\nL'objet de cette PR est de permettre à un Pix Master d'avoir le détail d'une organisation (nom, type, code, membres) depuis Pix Admin (`/organizations/{id}`).\r\n\r\n### 🦄 Détails d'implémentation\r\n\r\n- création d'un endpoint sécurisé (avec son use case et son repo)\r\n- déplacement de la logique de conversion de `BookshelfOrganization` → `OrganizationRepository`\r\n- ajout de la relation `members` dans le modèle du domaine `Organization`\r\n- utilisation de la factory dans des tests rencontrés (VS. des insert Knex à l'ancienne)\r\n\r\n### 🎉 Code review\r\n\r\nVous pouvez y aller commit-by-commit.\r\n\r\nJ'ai mis des single comments dans la PR pour faciliter la relecture.\r\n\r\nEt évidemment, un magnifique GIF ^^ : \r\n\r\n![pa-50](https://user-images.githubusercontent.com/265963/47303475-46375c00-d624-11e8-9d9b-b9f490f9ecaa.gif)\r\n\r\nEnjoy 😘","created_at":"2018-10-22T15:57:44Z","updated_at":"2018-10-24T12:39:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46b181e68ee1efe137c0969160735c6f24d5fe9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":881368535,"node_id":"MDU6TGFiZWw4ODEzNjg1MzU=","url":"https://api.github.com/repos/1024pix/pix/labels/[Tech]%20Review%20asked","name":"[Tech] Review asked","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/1024pix/pix/pulls/239/commits","review_comments_url":"https://api.github.com/repos/1024pix/pix/pulls/239/comments","review_comment_url":"https://api.github.com/repos/1024pix/pix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/1024pix/pix/issues/239/comments","statuses_url":"https://api.github.com/repos/1024pix/pix/statuses/54d39ba386caee846ae9996eec43e4c65404fc12","head":{"label":"1024pix:PA-50-consult-organization","ref":"PA-50-consult-organization","sha":"54d39ba386caee846ae9996eec43e4c65404fc12","user":{"login":"1024pix","id":24589578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg5NTc4","avatar_url":"https://avatars0.githubusercontent.com/u/24589578?v=4","gravatar_id":"","url":"https://api.github.com/users/1024pix","html_url":"https://github.com/1024pix","followers_url":"https://api.github.com/users/1024pix/followers","following_url":"https://api.github.com/users/1024pix/following{/other_user}","gists_url":"https://api.github.com/users/1024pix/gists{/gist_id}","starred_url":"https://api.github.com/users/1024pix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024pix/subscriptions","organizations_url":"https://api.github.com/users/1024pix/orgs","repos_url":"https://api.github.com/users/1024pix/repos","events_url":"https://api.github.com/users/1024pix/events{/privacy}","received_events_url":"https://api.github.com/users/1024pix/received_events","type":"Organization","site_admin":false},"repo":{"id":126852331,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY4NTIzMzE=","name":"pix","full_name":"1024pix/pix","private":false,"owner":{"login":"1024pix","id":24589578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg5NTc4","avatar_url":"https://avatars0.githubusercontent.com/u/24589578?v=4","gravatar_id":"","url":"https://api.github.com/users/1024pix","html_url":"https://github.com/1024pix","followers_url":"https://api.github.com/users/1024pix/followers","following_url":"https://api.github.com/users/1024pix/following{/other_user}","gists_url":"https://api.github.com/users/1024pix/gists{/gist_id}","starred_url":"https://api.github.com/users/1024pix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024pix/subscriptions","organizations_url":"https://api.github.com/users/1024pix/orgs","repos_url":"https://api.github.com/users/1024pix/repos","events_url":"https://api.github.com/users/1024pix/events{/privacy}","received_events_url":"https://api.github.com/users/1024pix/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/1024pix/pix","description":"Plateforme d'évaluation et de certification des compétences numériques à l'usage de tous les citoyens francophones.","fork":false,"url":"https://api.github.com/repos/1024pix/pix","forks_url":"https://api.github.com/repos/1024pix/pix/forks","keys_url":"https://api.github.com/repos/1024pix/pix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/1024pix/pix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/1024pix/pix/teams","hooks_url":"https://api.github.com/repos/1024pix/pix/hooks","issue_events_url":"https://api.github.com/repos/1024pix/pix/issues/events{/number}","events_url":"https://api.github.com/repos/1024pix/pix/events","assignees_url":"https://api.github.com/repos/1024pix/pix/assignees{/user}","branches_url":"https://api.github.com/repos/1024pix/pix/branches{/branch}","tags_url":"https://api.github.com/repos/1024pix/pix/tags","blobs_url":"https://api.github.com/repos/1024pix/pix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/1024pix/pix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/1024pix/pix/git/refs{/sha}","trees_url":"https://api.github.com/repos/1024pix/pix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/1024pix/pix/statuses/{sha}","languages_url":"https://api.github.com/repos/1024pix/pix/languages","stargazers_url":"https://api.github.com/repos/1024pix/pix/stargazers","contributors_url":"https://api.github.com/repos/1024pix/pix/contributors","subscribers_url":"https://api.github.com/repos/1024pix/pix/subscribers","subscription_url":"https://api.github.com/repos/1024pix/pix/subscription","commits_url":"https://api.github.com/repos/1024pix/pix/commits{/sha}","git_commits_url":"https://api.github.com/repos/1024pix/pix/git/commits{/sha}","comments_url":"https://api.github.com/repos/1024pix/pix/comments{/number}","issue_comment_url":"https://api.github.com/repos/1024pix/pix/issues/comments{/number}","contents_url":"https://api.github.com/repos/1024pix/pix/contents/{+path}","compare_url":"https://api.github.com/repos/1024pix/pix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/1024pix/pix/merges","archive_url":"https://api.github.com/repos/1024pix/pix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/1024pix/pix/downloads","issues_url":"https://api.github.com/repos/1024pix/pix/issues{/number}","pulls_url":"https://api.github.com/repos/1024pix/pix/pulls{/number}","milestones_url":"https://api.github.com/repos/1024pix/pix/milestones{/number}","notifications_url":"https://api.github.com/repos/1024pix/pix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/1024pix/pix/labels{/name}","releases_url":"https://api.github.com/repos/1024pix/pix/releases{/id}","deployments_url":"https://api.github.com/repos/1024pix/pix/deployments","created_at":"2018-03-26T15:47:12Z","updated_at":"2018-10-23T15:47:52Z","pushed_at":"2018-10-24T12:24:03Z","git_url":"git://github.com/1024pix/pix.git","ssh_url":"git@github.com:1024pix/pix.git","clone_url":"https://github.com/1024pix/pix.git","svn_url":"https://github.com/1024pix/pix","homepage":"https://pix.fr","size":197827,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":4,"open_issues":8,"watchers":17,"default_branch":"dev"}},"base":{"label":"1024pix:dev","ref":"dev","sha":"7618875711ee42e1c130c1f1c58b30fc82f14b84","user":{"login":"1024pix","id":24589578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg5NTc4","avatar_url":"https://avatars0.githubusercontent.com/u/24589578?v=4","gravatar_id":"","url":"https://api.github.com/users/1024pix","html_url":"https://github.com/1024pix","followers_url":"https://api.github.com/users/1024pix/followers","following_url":"https://api.github.com/users/1024pix/following{/other_user}","gists_url":"https://api.github.com/users/1024pix/gists{/gist_id}","starred_url":"https://api.github.com/users/1024pix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024pix/subscriptions","organizations_url":"https://api.github.com/users/1024pix/orgs","repos_url":"https://api.github.com/users/1024pix/repos","events_url":"https://api.github.com/users/1024pix/events{/privacy}","received_events_url":"https://api.github.com/users/1024pix/received_events","type":"Organization","site_admin":false},"repo":{"id":126852331,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY4NTIzMzE=","name":"pix","full_name":"1024pix/pix","private":false,"owner":{"login":"1024pix","id":24589578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg5NTc4","avatar_url":"https://avatars0.githubusercontent.com/u/24589578?v=4","gravatar_id":"","url":"https://api.github.com/users/1024pix","html_url":"https://github.com/1024pix","followers_url":"https://api.github.com/users/1024pix/followers","following_url":"https://api.github.com/users/1024pix/following{/other_user}","gists_url":"https://api.github.com/users/1024pix/gists{/gist_id}","starred_url":"https://api.github.com/users/1024pix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024pix/subscriptions","organizations_url":"https://api.github.com/users/1024pix/orgs","repos_url":"https://api.github.com/users/1024pix/repos","events_url":"https://api.github.com/users/1024pix/events{/privacy}","received_events_url":"https://api.github.com/users/1024pix/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/1024pix/pix","description":"Plateforme d'évaluation et de certification des compétences numériques à l'usage de tous les citoyens francophones.","fork":false,"url":"https://api.github.com/repos/1024pix/pix","forks_url":"https://api.github.com/repos/1024pix/pix/forks","keys_url":"https://api.github.com/repos/1024pix/pix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/1024pix/pix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/1024pix/pix/teams","hooks_url":"https://api.github.com/repos/1024pix/pix/hooks","issue_events_url":"https://api.github.com/repos/1024pix/pix/issues/events{/number}","events_url":"https://api.github.com/repos/1024pix/pix/events","assignees_url":"https://api.github.com/repos/1024pix/pix/assignees{/user}","branches_url":"https://api.github.com/repos/1024pix/pix/branches{/branch}","tags_url":"https://api.github.com/repos/1024pix/pix/tags","blobs_url":"https://api.github.com/repos/1024pix/pix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/1024pix/pix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/1024pix/pix/git/refs{/sha}","trees_url":"https://api.github.com/repos/1024pix/pix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/1024pix/pix/statuses/{sha}","languages_url":"https://api.github.com/repos/1024pix/pix/languages","stargazers_url":"https://api.github.com/repos/1024pix/pix/stargazers","contributors_url":"https://api.github.com/repos/1024pix/pix/contributors","subscribers_url":"https://api.github.com/repos/1024pix/pix/subscribers","subscription_url":"https://api.github.com/repos/1024pix/pix/subscription","commits_url":"https://api.github.com/repos/1024pix/pix/commits{/sha}","git_commits_url":"https://api.github.com/repos/1024pix/pix/git/commits{/sha}","comments_url":"https://api.github.com/repos/1024pix/pix/comments{/number}","issue_comment_url":"https://api.github.com/repos/1024pix/pix/issues/comments{/number}","contents_url":"https://api.github.com/repos/1024pix/pix/contents/{+path}","compare_url":"https://api.github.com/repos/1024pix/pix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/1024pix/pix/merges","archive_url":"https://api.github.com/repos/1024pix/pix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/1024pix/pix/downloads","issues_url":"https://api.github.com/repos/1024pix/pix/issues{/number}","pulls_url":"https://api.github.com/repos/1024pix/pix/pulls{/number}","milestones_url":"https://api.github.com/repos/1024pix/pix/milestones{/number}","notifications_url":"https://api.github.com/repos/1024pix/pix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/1024pix/pix/labels{/name}","releases_url":"https://api.github.com/repos/1024pix/pix/releases{/id}","deployments_url":"https://api.github.com/repos/1024pix/pix/deployments","created_at":"2018-03-26T15:47:12Z","updated_at":"2018-10-23T15:47:52Z","pushed_at":"2018-10-24T12:24:03Z","git_url":"git://github.com/1024pix/pix.git","ssh_url":"git@github.com:1024pix/pix.git","clone_url":"https://github.com/1024pix/pix.git","svn_url":"https://github.com/1024pix/pix","homepage":"https://pix.fr","size":197827,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":4,"open_issues":8,"watchers":17,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/1024pix/pix/pulls/239"},"html":{"href":"https://github.com/1024pix/pix/pull/239"},"issue":{"href":"https://api.github.com/repos/1024pix/pix/issues/239"},"comments":{"href":"https://api.github.com/repos/1024pix/pix/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/1024pix/pix/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/1024pix/pix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/1024pix/pix/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/1024pix/pix/statuses/54d39ba386caee846ae9996eec43e4c65404fc12"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mlaurent"}}