{"action":"created","comment":{"url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/comments/189807052","pull_request_review_id":122055124,"id":189807052,"diff_hunk":"@@ -525,4 +527,40 @@ public function countByGenderManagedBy(Adherent $referent): array\n             ->getArrayResult()\n         ;\n     }\n+\n+    public function countSupervisorsByGenderForReferent(Adherent $referent): array\n+    {\n+        if (!$referent->isReferent()) {\n+            throw new \\InvalidArgumentException('Adherent must be a referent.');\n+        }\n+\n+        $result = $this->createQueryBuilder('adherent', 'adherent.gender')\n+            ->select('adherent.gender, COUNT(DISTINCT adherent) AS count')\n+            ->join('adherent.memberships', 'membership')\n+            ->join(Committee::class, 'committee', Join::WITH, 'committee.uuid = membership.committeeUuid')\n+            ->join('committee.referentTags', 'tag')\n+            ->where('tag.id IN (:tags)')","path":"src/Repository/AdherentRepository.php","position":37,"original_position":37,"commit_id":"8853961cc89968fdee1bf95e588016ad9fcba22e","original_commit_id":"8853961cc89968fdee1bf95e588016ad9fcba22e","user":{"login":"ottaviano","id":4582866,"avatar_url":"https://avatars2.githubusercontent.com/u/4582866?v=4","gravatar_id":"","url":"https://api.github.com/users/ottaviano","html_url":"https://github.com/ottaviano","followers_url":"https://api.github.com/users/ottaviano/followers","following_url":"https://api.github.com/users/ottaviano/following{/other_user}","gists_url":"https://api.github.com/users/ottaviano/gists{/gist_id}","starred_url":"https://api.github.com/users/ottaviano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ottaviano/subscriptions","organizations_url":"https://api.github.com/users/ottaviano/orgs","repos_url":"https://api.github.com/users/ottaviano/repos","events_url":"https://api.github.com/users/ottaviano/events{/privacy}","received_events_url":"https://api.github.com/users/ottaviano/received_events","type":"User","site_admin":false},"body":"can you try to use `andWhere('committee.referentTags IN (...))` directly and remove the join `->join('committee.referentTags', 'tag')`?","created_at":"2018-05-22T07:57:53Z","updated_at":"2018-05-22T07:58:04Z","html_url":"https://github.com/EnMarche/en-marche.fr/pull/2402#discussion_r189807052","pull_request_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/comments/189807052"},"html":{"href":"https://github.com/EnMarche/en-marche.fr/pull/2402#discussion_r189807052"},"pull_request":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402"}}},"pull_request":{"url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402","id":188059220,"html_url":"https://github.com/EnMarche/en-marche.fr/pull/2402","diff_url":"https://github.com/EnMarche/en-marche.fr/pull/2402.diff","patch_url":"https://github.com/EnMarche/en-marche.fr/pull/2402.patch","issue_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/2402","number":2402,"state":"open","locked":false,"title":"Create endpoint for committees count and committee supervisors count by gender","user":{"login":"illusionOfParadise","id":15227655,"avatar_url":"https://avatars2.githubusercontent.com/u/15227655?v=4","gravatar_id":"","url":"https://api.github.com/users/illusionOfParadise","html_url":"https://github.com/illusionOfParadise","followers_url":"https://api.github.com/users/illusionOfParadise/followers","following_url":"https://api.github.com/users/illusionOfParadise/following{/other_user}","gists_url":"https://api.github.com/users/illusionOfParadise/gists{/gist_id}","starred_url":"https://api.github.com/users/illusionOfParadise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illusionOfParadise/subscriptions","organizations_url":"https://api.github.com/users/illusionOfParadise/orgs","repos_url":"https://api.github.com/users/illusionOfParadise/repos","events_url":"https://api.github.com/users/illusionOfParadise/events{/privacy}","received_events_url":"https://api.github.com/users/illusionOfParadise/received_events","type":"User","site_admin":false},"body":"https://app.clubhouse.io/enmarche/story/3616/2e-partie-section-comit%C3%A9s-box-kpis-comit%C3%A9s","created_at":"2018-05-15T09:04:06Z","updated_at":"2018-05-22T07:58:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"722a4dbde6edd95830c37f71edf6698fce1671f8","assignee":{"login":"illusionOfParadise","id":15227655,"avatar_url":"https://avatars2.githubusercontent.com/u/15227655?v=4","gravatar_id":"","url":"https://api.github.com/users/illusionOfParadise","html_url":"https://github.com/illusionOfParadise","followers_url":"https://api.github.com/users/illusionOfParadise/followers","following_url":"https://api.github.com/users/illusionOfParadise/following{/other_user}","gists_url":"https://api.github.com/users/illusionOfParadise/gists{/gist_id}","starred_url":"https://api.github.com/users/illusionOfParadise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illusionOfParadise/subscriptions","organizations_url":"https://api.github.com/users/illusionOfParadise/orgs","repos_url":"https://api.github.com/users/illusionOfParadise/repos","events_url":"https://api.github.com/users/illusionOfParadise/events{/privacy}","received_events_url":"https://api.github.com/users/illusionOfParadise/received_events","type":"User","site_admin":false},"assignees":[{"login":"illusionOfParadise","id":15227655,"avatar_url":"https://avatars2.githubusercontent.com/u/15227655?v=4","gravatar_id":"","url":"https://api.github.com/users/illusionOfParadise","html_url":"https://github.com/illusionOfParadise","followers_url":"https://api.github.com/users/illusionOfParadise/followers","following_url":"https://api.github.com/users/illusionOfParadise/following{/other_user}","gists_url":"https://api.github.com/users/illusionOfParadise/gists{/gist_id}","starred_url":"https://api.github.com/users/illusionOfParadise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illusionOfParadise/subscriptions","organizations_url":"https://api.github.com/users/illusionOfParadise/orgs","repos_url":"https://api.github.com/users/illusionOfParadise/repos","events_url":"https://api.github.com/users/illusionOfParadise/events{/privacy}","received_events_url":"https://api.github.com/users/illusionOfParadise/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"cacahouwete","id":1099956,"avatar_url":"https://avatars3.githubusercontent.com/u/1099956?v=4","gravatar_id":"","url":"https://api.github.com/users/cacahouwete","html_url":"https://github.com/cacahouwete","followers_url":"https://api.github.com/users/cacahouwete/followers","following_url":"https://api.github.com/users/cacahouwete/following{/other_user}","gists_url":"https://api.github.com/users/cacahouwete/gists{/gist_id}","starred_url":"https://api.github.com/users/cacahouwete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cacahouwete/subscriptions","organizations_url":"https://api.github.com/users/cacahouwete/orgs","repos_url":"https://api.github.com/users/cacahouwete/repos","events_url":"https://api.github.com/users/cacahouwete/events{/privacy}","received_events_url":"https://api.github.com/users/cacahouwete/received_events","type":"User","site_admin":false},{"login":"thomasbisignani","id":6014143,"avatar_url":"https://avatars3.githubusercontent.com/u/6014143?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasbisignani","html_url":"https://github.com/thomasbisignani","followers_url":"https://api.github.com/users/thomasbisignani/followers","following_url":"https://api.github.com/users/thomasbisignani/following{/other_user}","gists_url":"https://api.github.com/users/thomasbisignani/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasbisignani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasbisignani/subscriptions","organizations_url":"https://api.github.com/users/thomasbisignani/orgs","repos_url":"https://api.github.com/users/thomasbisignani/repos","events_url":"https://api.github.com/users/thomasbisignani/events{/privacy}","received_events_url":"https://api.github.com/users/thomasbisignani/received_events","type":"User","site_admin":false},{"login":"Remg","id":8271347,"avatar_url":"https://avatars3.githubusercontent.com/u/8271347?v=4","gravatar_id":"","url":"https://api.github.com/users/Remg","html_url":"https://github.com/Remg","followers_url":"https://api.github.com/users/Remg/followers","following_url":"https://api.github.com/users/Remg/following{/other_user}","gists_url":"https://api.github.com/users/Remg/gists{/gist_id}","starred_url":"https://api.github.com/users/Remg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remg/subscriptions","organizations_url":"https://api.github.com/users/Remg/orgs","repos_url":"https://api.github.com/users/Remg/repos","events_url":"https://api.github.com/users/Remg/events{/privacy}","received_events_url":"https://api.github.com/users/Remg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":503589417,"url":"https://api.github.com/repos/EnMarche/en-marche.fr/labels/Ready%20for%20code%20review","name":"Ready for code review","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402/commits","review_comments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402/comments","review_comment_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/2402/comments","statuses_url":"https://api.github.com/repos/EnMarche/en-marche.fr/statuses/8853961cc89968fdee1bf95e588016ad9fcba22e","head":{"label":"EnMarche:feature/ch3616/2e-partie-section-comités-box-kpis-comités","ref":"feature/ch3616/2e-partie-section-comités-box-kpis-comités","sha":"8853961cc89968fdee1bf95e588016ad9fcba22e","user":{"login":"EnMarche","id":24521375,"avatar_url":"https://avatars0.githubusercontent.com/u/24521375?v=4","gravatar_id":"","url":"https://api.github.com/users/EnMarche","html_url":"https://github.com/EnMarche","followers_url":"https://api.github.com/users/EnMarche/followers","following_url":"https://api.github.com/users/EnMarche/following{/other_user}","gists_url":"https://api.github.com/users/EnMarche/gists{/gist_id}","starred_url":"https://api.github.com/users/EnMarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnMarche/subscriptions","organizations_url":"https://api.github.com/users/EnMarche/orgs","repos_url":"https://api.github.com/users/EnMarche/repos","events_url":"https://api.github.com/users/EnMarche/events{/privacy}","received_events_url":"https://api.github.com/users/EnMarche/received_events","type":"Organization","site_admin":false},"repo":{"id":76485630,"name":"en-marche.fr","full_name":"EnMarche/en-marche.fr","owner":{"login":"EnMarche","id":24521375,"avatar_url":"https://avatars0.githubusercontent.com/u/24521375?v=4","gravatar_id":"","url":"https://api.github.com/users/EnMarche","html_url":"https://github.com/EnMarche","followers_url":"https://api.github.com/users/EnMarche/followers","following_url":"https://api.github.com/users/EnMarche/following{/other_user}","gists_url":"https://api.github.com/users/EnMarche/gists{/gist_id}","starred_url":"https://api.github.com/users/EnMarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnMarche/subscriptions","organizations_url":"https://api.github.com/users/EnMarche/orgs","repos_url":"https://api.github.com/users/EnMarche/repos","events_url":"https://api.github.com/users/EnMarche/events{/privacy}","received_events_url":"https://api.github.com/users/EnMarche/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EnMarche/en-marche.fr","description":"Le site principal du mouvement En Marche ! ","fork":false,"url":"https://api.github.com/repos/EnMarche/en-marche.fr","forks_url":"https://api.github.com/repos/EnMarche/en-marche.fr/forks","keys_url":"https://api.github.com/repos/EnMarche/en-marche.fr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EnMarche/en-marche.fr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EnMarche/en-marche.fr/teams","hooks_url":"https://api.github.com/repos/EnMarche/en-marche.fr/hooks","issue_events_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/events{/number}","events_url":"https://api.github.com/repos/EnMarche/en-marche.fr/events","assignees_url":"https://api.github.com/repos/EnMarche/en-marche.fr/assignees{/user}","branches_url":"https://api.github.com/repos/EnMarche/en-marche.fr/branches{/branch}","tags_url":"https://api.github.com/repos/EnMarche/en-marche.fr/tags","blobs_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/refs{/sha}","trees_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EnMarche/en-marche.fr/statuses/{sha}","languages_url":"https://api.github.com/repos/EnMarche/en-marche.fr/languages","stargazers_url":"https://api.github.com/repos/EnMarche/en-marche.fr/stargazers","contributors_url":"https://api.github.com/repos/EnMarche/en-marche.fr/contributors","subscribers_url":"https://api.github.com/repos/EnMarche/en-marche.fr/subscribers","subscription_url":"https://api.github.com/repos/EnMarche/en-marche.fr/subscription","commits_url":"https://api.github.com/repos/EnMarche/en-marche.fr/commits{/sha}","git_commits_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/commits{/sha}","comments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/comments{/number}","issue_comment_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/comments{/number}","contents_url":"https://api.github.com/repos/EnMarche/en-marche.fr/contents/{+path}","compare_url":"https://api.github.com/repos/EnMarche/en-marche.fr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EnMarche/en-marche.fr/merges","archive_url":"https://api.github.com/repos/EnMarche/en-marche.fr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EnMarche/en-marche.fr/downloads","issues_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues{/number}","pulls_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls{/number}","milestones_url":"https://api.github.com/repos/EnMarche/en-marche.fr/milestones{/number}","notifications_url":"https://api.github.com/repos/EnMarche/en-marche.fr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EnMarche/en-marche.fr/labels{/name}","releases_url":"https://api.github.com/repos/EnMarche/en-marche.fr/releases{/id}","deployments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/deployments","created_at":"2016-12-14T18:22:36Z","updated_at":"2018-05-21T16:36:59Z","pushed_at":"2018-05-21T21:45:08Z","git_url":"git://github.com/EnMarche/en-marche.fr.git","ssh_url":"git@github.com:EnMarche/en-marche.fr.git","clone_url":"https://github.com/EnMarche/en-marche.fr.git","svn_url":"https://github.com/EnMarche/en-marche.fr","homepage":"https://en-marche.fr","size":133082,"stargazers_count":667,"watchers_count":667,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":155,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":155,"open_issues":38,"watchers":667,"default_branch":"master"}},"base":{"label":"EnMarche:master","ref":"master","sha":"093aef833c36f6f38361316dc3d01f67fb8c0019","user":{"login":"EnMarche","id":24521375,"avatar_url":"https://avatars0.githubusercontent.com/u/24521375?v=4","gravatar_id":"","url":"https://api.github.com/users/EnMarche","html_url":"https://github.com/EnMarche","followers_url":"https://api.github.com/users/EnMarche/followers","following_url":"https://api.github.com/users/EnMarche/following{/other_user}","gists_url":"https://api.github.com/users/EnMarche/gists{/gist_id}","starred_url":"https://api.github.com/users/EnMarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnMarche/subscriptions","organizations_url":"https://api.github.com/users/EnMarche/orgs","repos_url":"https://api.github.com/users/EnMarche/repos","events_url":"https://api.github.com/users/EnMarche/events{/privacy}","received_events_url":"https://api.github.com/users/EnMarche/received_events","type":"Organization","site_admin":false},"repo":{"id":76485630,"name":"en-marche.fr","full_name":"EnMarche/en-marche.fr","owner":{"login":"EnMarche","id":24521375,"avatar_url":"https://avatars0.githubusercontent.com/u/24521375?v=4","gravatar_id":"","url":"https://api.github.com/users/EnMarche","html_url":"https://github.com/EnMarche","followers_url":"https://api.github.com/users/EnMarche/followers","following_url":"https://api.github.com/users/EnMarche/following{/other_user}","gists_url":"https://api.github.com/users/EnMarche/gists{/gist_id}","starred_url":"https://api.github.com/users/EnMarche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EnMarche/subscriptions","organizations_url":"https://api.github.com/users/EnMarche/orgs","repos_url":"https://api.github.com/users/EnMarche/repos","events_url":"https://api.github.com/users/EnMarche/events{/privacy}","received_events_url":"https://api.github.com/users/EnMarche/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EnMarche/en-marche.fr","description":"Le site principal du mouvement En Marche ! ","fork":false,"url":"https://api.github.com/repos/EnMarche/en-marche.fr","forks_url":"https://api.github.com/repos/EnMarche/en-marche.fr/forks","keys_url":"https://api.github.com/repos/EnMarche/en-marche.fr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EnMarche/en-marche.fr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EnMarche/en-marche.fr/teams","hooks_url":"https://api.github.com/repos/EnMarche/en-marche.fr/hooks","issue_events_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/events{/number}","events_url":"https://api.github.com/repos/EnMarche/en-marche.fr/events","assignees_url":"https://api.github.com/repos/EnMarche/en-marche.fr/assignees{/user}","branches_url":"https://api.github.com/repos/EnMarche/en-marche.fr/branches{/branch}","tags_url":"https://api.github.com/repos/EnMarche/en-marche.fr/tags","blobs_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/refs{/sha}","trees_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EnMarche/en-marche.fr/statuses/{sha}","languages_url":"https://api.github.com/repos/EnMarche/en-marche.fr/languages","stargazers_url":"https://api.github.com/repos/EnMarche/en-marche.fr/stargazers","contributors_url":"https://api.github.com/repos/EnMarche/en-marche.fr/contributors","subscribers_url":"https://api.github.com/repos/EnMarche/en-marche.fr/subscribers","subscription_url":"https://api.github.com/repos/EnMarche/en-marche.fr/subscription","commits_url":"https://api.github.com/repos/EnMarche/en-marche.fr/commits{/sha}","git_commits_url":"https://api.github.com/repos/EnMarche/en-marche.fr/git/commits{/sha}","comments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/comments{/number}","issue_comment_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/comments{/number}","contents_url":"https://api.github.com/repos/EnMarche/en-marche.fr/contents/{+path}","compare_url":"https://api.github.com/repos/EnMarche/en-marche.fr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EnMarche/en-marche.fr/merges","archive_url":"https://api.github.com/repos/EnMarche/en-marche.fr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EnMarche/en-marche.fr/downloads","issues_url":"https://api.github.com/repos/EnMarche/en-marche.fr/issues{/number}","pulls_url":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls{/number}","milestones_url":"https://api.github.com/repos/EnMarche/en-marche.fr/milestones{/number}","notifications_url":"https://api.github.com/repos/EnMarche/en-marche.fr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EnMarche/en-marche.fr/labels{/name}","releases_url":"https://api.github.com/repos/EnMarche/en-marche.fr/releases{/id}","deployments_url":"https://api.github.com/repos/EnMarche/en-marche.fr/deployments","created_at":"2016-12-14T18:22:36Z","updated_at":"2018-05-21T16:36:59Z","pushed_at":"2018-05-21T21:45:08Z","git_url":"git://github.com/EnMarche/en-marche.fr.git","ssh_url":"git@github.com:EnMarche/en-marche.fr.git","clone_url":"https://github.com/EnMarche/en-marche.fr.git","svn_url":"https://github.com/EnMarche/en-marche.fr","homepage":"https://en-marche.fr","size":133082,"stargazers_count":667,"watchers_count":667,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":155,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":155,"open_issues":38,"watchers":667,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402"},"html":{"href":"https://github.com/EnMarche/en-marche.fr/pull/2402"},"issue":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/2402"},"comments":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/issues/2402/comments"},"review_comments":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402/comments"},"review_comment":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/pulls/2402/commits"},"statuses":{"href":"https://api.github.com/repos/EnMarche/en-marche.fr/statuses/8853961cc89968fdee1bf95e588016ad9fcba22e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ottaviano"}}