{"action":"created","comment":{"url":"https://api.github.com/repos/ReCodEx/api/pulls/comments/207628378","pull_request_review_id":143286169,"id":207628378,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzYyODM3OA==","diff_hunk":"@@ -0,0 +1,32 @@\n+<?php\n+\n+namespace App\\Model\\Repository;\n+\n+use App\\Model\\Entity\\ShadowAssignment;\n+use App\\Model\\Entity\\ShadowAssignmentPoints;\n+use App\\Model\\Entity\\User;\n+use Kdyby\\Doctrine\\EntityManager;\n+\n+/**\n+ * @method ShadowAssignmentPoints findOrThrow($id)\n+ */\n+class ShadowAssignmentPointsRepository extends BaseRepository {\n+\n+  public function __construct(EntityManager $em) {\n+    parent::__construct($em, ShadowAssignmentPoints::class);\n+  }\n+\n+  /**\n+   * Find best solutions of given assignments for user.\n+   * @param ShadowAssignment[] $shadowAssignments\n+   * @param User $user\n+   * @return ShadowAssignmentPoints[]\n+   */\n+  public function findEvaluationsForAssignment(array $shadowAssignments, User $user): array {\n+    return $this->findBy([\n+      \"author\" => $user,\n+      \"shadowAssignment\" => $shadowAssignments,","path":"app/model/repository/ShadowAssignmentPointsRepository.php","position":28,"original_position":28,"commit_id":"78fc26b7ef018c1652319a7f2d23d78fb580e129","original_commit_id":"78fc26b7ef018c1652319a7f2d23d78fb580e129","user":{"login":"krulis-martin","id":26253487,"node_id":"MDQ6VXNlcjI2MjUzNDg3","avatar_url":"https://avatars3.githubusercontent.com/u/26253487?v=4","gravatar_id":"","url":"https://api.github.com/users/krulis-martin","html_url":"https://github.com/krulis-martin","followers_url":"https://api.github.com/users/krulis-martin/followers","following_url":"https://api.github.com/users/krulis-martin/following{/other_user}","gists_url":"https://api.github.com/users/krulis-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/krulis-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krulis-martin/subscriptions","organizations_url":"https://api.github.com/users/krulis-martin/orgs","repos_url":"https://api.github.com/users/krulis-martin/repos","events_url":"https://api.github.com/users/krulis-martin/events{/privacy}","received_events_url":"https://api.github.com/users/krulis-martin/received_events","type":"User","site_admin":false},"body":"Sorry, I do not see, how this should work. Why is $shadowAssignments an array, passed to ManyToOne property shadowAssignment? I was expecting just one shadow assignment.","created_at":"2018-08-03T18:21:40Z","updated_at":"2018-08-03T18:21:41Z","html_url":"https://github.com/ReCodEx/api/pull/229#discussion_r207628378","pull_request_url":"https://api.github.com/repos/ReCodEx/api/pulls/229","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/comments/207628378"},"html":{"href":"https://github.com/ReCodEx/api/pull/229#discussion_r207628378"},"pull_request":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/ReCodEx/api/pulls/229","id":205239402,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MjM5NDAy","html_url":"https://github.com/ReCodEx/api/pull/229","diff_url":"https://github.com/ReCodEx/api/pull/229.diff","patch_url":"https://github.com/ReCodEx/api/pull/229.patch","issue_url":"https://api.github.com/repos/ReCodEx/api/issues/229","number":229,"state":"open","locked":false,"title":"Shadow assignments","user":{"login":"Neloop","id":15379972,"node_id":"MDQ6VXNlcjE1Mzc5OTcy","avatar_url":"https://avatars3.githubusercontent.com/u/15379972?v=4","gravatar_id":"","url":"https://api.github.com/users/Neloop","html_url":"https://github.com/Neloop","followers_url":"https://api.github.com/users/Neloop/followers","following_url":"https://api.github.com/users/Neloop/following{/other_user}","gists_url":"https://api.github.com/users/Neloop/gists{/gist_id}","starred_url":"https://api.github.com/users/Neloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neloop/subscriptions","organizations_url":"https://api.github.com/users/Neloop/orgs","repos_url":"https://api.github.com/users/Neloop/repos","events_url":"https://api.github.com/users/Neloop/events{/privacy}","received_events_url":"https://api.github.com/users/Neloop/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T20:54:50Z","updated_at":"2018-08-03T18:21:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f30229c84c94449a9c9f20c2a17b4663ab002bde","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ReCodEx/api/pulls/229/commits","review_comments_url":"https://api.github.com/repos/ReCodEx/api/pulls/229/comments","review_comment_url":"https://api.github.com/repos/ReCodEx/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReCodEx/api/issues/229/comments","statuses_url":"https://api.github.com/repos/ReCodEx/api/statuses/78fc26b7ef018c1652319a7f2d23d78fb580e129","head":{"label":"ReCodEx:standalone-bonus-points","ref":"standalone-bonus-points","sha":"78fc26b7ef018c1652319a7f2d23d78fb580e129","user":{"login":"ReCodEx","id":15342590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzQyNTkw","avatar_url":"https://avatars0.githubusercontent.com/u/15342590?v=4","gravatar_id":"","url":"https://api.github.com/users/ReCodEx","html_url":"https://github.com/ReCodEx","followers_url":"https://api.github.com/users/ReCodEx/followers","following_url":"https://api.github.com/users/ReCodEx/following{/other_user}","gists_url":"https://api.github.com/users/ReCodEx/gists{/gist_id}","starred_url":"https://api.github.com/users/ReCodEx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReCodEx/subscriptions","organizations_url":"https://api.github.com/users/ReCodEx/orgs","repos_url":"https://api.github.com/users/ReCodEx/repos","events_url":"https://api.github.com/users/ReCodEx/events{/privacy}","received_events_url":"https://api.github.com/users/ReCodEx/received_events","type":"Organization","site_admin":false},"repo":{"id":64029948,"node_id":"MDEwOlJlcG9zaXRvcnk2NDAyOTk0OA==","name":"api","full_name":"ReCodEx/api","owner":{"login":"ReCodEx","id":15342590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzQyNTkw","avatar_url":"https://avatars0.githubusercontent.com/u/15342590?v=4","gravatar_id":"","url":"https://api.github.com/users/ReCodEx","html_url":"https://github.com/ReCodEx","followers_url":"https://api.github.com/users/ReCodEx/followers","following_url":"https://api.github.com/users/ReCodEx/following{/other_user}","gists_url":"https://api.github.com/users/ReCodEx/gists{/gist_id}","starred_url":"https://api.github.com/users/ReCodEx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReCodEx/subscriptions","organizations_url":"https://api.github.com/users/ReCodEx/orgs","repos_url":"https://api.github.com/users/ReCodEx/repos","events_url":"https://api.github.com/users/ReCodEx/events{/privacy}","received_events_url":"https://api.github.com/users/ReCodEx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReCodEx/api","description":"Publicly accessible REST API for ReCodEx system","fork":false,"url":"https://api.github.com/repos/ReCodEx/api","forks_url":"https://api.github.com/repos/ReCodEx/api/forks","keys_url":"https://api.github.com/repos/ReCodEx/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReCodEx/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReCodEx/api/teams","hooks_url":"https://api.github.com/repos/ReCodEx/api/hooks","issue_events_url":"https://api.github.com/repos/ReCodEx/api/issues/events{/number}","events_url":"https://api.github.com/repos/ReCodEx/api/events","assignees_url":"https://api.github.com/repos/ReCodEx/api/assignees{/user}","branches_url":"https://api.github.com/repos/ReCodEx/api/branches{/branch}","tags_url":"https://api.github.com/repos/ReCodEx/api/tags","blobs_url":"https://api.github.com/repos/ReCodEx/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReCodEx/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReCodEx/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReCodEx/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReCodEx/api/statuses/{sha}","languages_url":"https://api.github.com/repos/ReCodEx/api/languages","stargazers_url":"https://api.github.com/repos/ReCodEx/api/stargazers","contributors_url":"https://api.github.com/repos/ReCodEx/api/contributors","subscribers_url":"https://api.github.com/repos/ReCodEx/api/subscribers","subscription_url":"https://api.github.com/repos/ReCodEx/api/subscription","commits_url":"https://api.github.com/repos/ReCodEx/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReCodEx/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReCodEx/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReCodEx/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReCodEx/api/contents/{+path}","compare_url":"https://api.github.com/repos/ReCodEx/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReCodEx/api/merges","archive_url":"https://api.github.com/repos/ReCodEx/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReCodEx/api/downloads","issues_url":"https://api.github.com/repos/ReCodEx/api/issues{/number}","pulls_url":"https://api.github.com/repos/ReCodEx/api/pulls{/number}","milestones_url":"https://api.github.com/repos/ReCodEx/api/milestones{/number}","notifications_url":"https://api.github.com/repos/ReCodEx/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReCodEx/api/labels{/name}","releases_url":"https://api.github.com/repos/ReCodEx/api/releases{/id}","deployments_url":"https://api.github.com/repos/ReCodEx/api/deployments","created_at":"2016-07-23T18:30:47Z","updated_at":"2018-08-03T11:50:53Z","pushed_at":"2018-08-03T11:50:54Z","git_url":"git://github.com/ReCodEx/api.git","ssh_url":"git@github.com:ReCodEx/api.git","clone_url":"https://github.com/ReCodEx/api.git","svn_url":"https://github.com/ReCodEx/api","homepage":"https://recodex.mff.cuni.cz/api/v1","size":5825,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"ReCodEx:master","ref":"master","sha":"f898ff1aa0ed2ee9b59a3fe02a180592aafa5cab","user":{"login":"ReCodEx","id":15342590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzQyNTkw","avatar_url":"https://avatars0.githubusercontent.com/u/15342590?v=4","gravatar_id":"","url":"https://api.github.com/users/ReCodEx","html_url":"https://github.com/ReCodEx","followers_url":"https://api.github.com/users/ReCodEx/followers","following_url":"https://api.github.com/users/ReCodEx/following{/other_user}","gists_url":"https://api.github.com/users/ReCodEx/gists{/gist_id}","starred_url":"https://api.github.com/users/ReCodEx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReCodEx/subscriptions","organizations_url":"https://api.github.com/users/ReCodEx/orgs","repos_url":"https://api.github.com/users/ReCodEx/repos","events_url":"https://api.github.com/users/ReCodEx/events{/privacy}","received_events_url":"https://api.github.com/users/ReCodEx/received_events","type":"Organization","site_admin":false},"repo":{"id":64029948,"node_id":"MDEwOlJlcG9zaXRvcnk2NDAyOTk0OA==","name":"api","full_name":"ReCodEx/api","owner":{"login":"ReCodEx","id":15342590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzQyNTkw","avatar_url":"https://avatars0.githubusercontent.com/u/15342590?v=4","gravatar_id":"","url":"https://api.github.com/users/ReCodEx","html_url":"https://github.com/ReCodEx","followers_url":"https://api.github.com/users/ReCodEx/followers","following_url":"https://api.github.com/users/ReCodEx/following{/other_user}","gists_url":"https://api.github.com/users/ReCodEx/gists{/gist_id}","starred_url":"https://api.github.com/users/ReCodEx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReCodEx/subscriptions","organizations_url":"https://api.github.com/users/ReCodEx/orgs","repos_url":"https://api.github.com/users/ReCodEx/repos","events_url":"https://api.github.com/users/ReCodEx/events{/privacy}","received_events_url":"https://api.github.com/users/ReCodEx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReCodEx/api","description":"Publicly accessible REST API for ReCodEx system","fork":false,"url":"https://api.github.com/repos/ReCodEx/api","forks_url":"https://api.github.com/repos/ReCodEx/api/forks","keys_url":"https://api.github.com/repos/ReCodEx/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReCodEx/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReCodEx/api/teams","hooks_url":"https://api.github.com/repos/ReCodEx/api/hooks","issue_events_url":"https://api.github.com/repos/ReCodEx/api/issues/events{/number}","events_url":"https://api.github.com/repos/ReCodEx/api/events","assignees_url":"https://api.github.com/repos/ReCodEx/api/assignees{/user}","branches_url":"https://api.github.com/repos/ReCodEx/api/branches{/branch}","tags_url":"https://api.github.com/repos/ReCodEx/api/tags","blobs_url":"https://api.github.com/repos/ReCodEx/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReCodEx/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReCodEx/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReCodEx/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReCodEx/api/statuses/{sha}","languages_url":"https://api.github.com/repos/ReCodEx/api/languages","stargazers_url":"https://api.github.com/repos/ReCodEx/api/stargazers","contributors_url":"https://api.github.com/repos/ReCodEx/api/contributors","subscribers_url":"https://api.github.com/repos/ReCodEx/api/subscribers","subscription_url":"https://api.github.com/repos/ReCodEx/api/subscription","commits_url":"https://api.github.com/repos/ReCodEx/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReCodEx/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReCodEx/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReCodEx/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReCodEx/api/contents/{+path}","compare_url":"https://api.github.com/repos/ReCodEx/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReCodEx/api/merges","archive_url":"https://api.github.com/repos/ReCodEx/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReCodEx/api/downloads","issues_url":"https://api.github.com/repos/ReCodEx/api/issues{/number}","pulls_url":"https://api.github.com/repos/ReCodEx/api/pulls{/number}","milestones_url":"https://api.github.com/repos/ReCodEx/api/milestones{/number}","notifications_url":"https://api.github.com/repos/ReCodEx/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReCodEx/api/labels{/name}","releases_url":"https://api.github.com/repos/ReCodEx/api/releases{/id}","deployments_url":"https://api.github.com/repos/ReCodEx/api/deployments","created_at":"2016-07-23T18:30:47Z","updated_at":"2018-08-03T11:50:53Z","pushed_at":"2018-08-03T11:50:54Z","git_url":"git://github.com/ReCodEx/api.git","ssh_url":"git@github.com:ReCodEx/api.git","clone_url":"https://github.com/ReCodEx/api.git","svn_url":"https://github.com/ReCodEx/api","homepage":"https://recodex.mff.cuni.cz/api/v1","size":5825,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/229"},"html":{"href":"https://github.com/ReCodEx/api/pull/229"},"issue":{"href":"https://api.github.com/repos/ReCodEx/api/issues/229"},"comments":{"href":"https://api.github.com/repos/ReCodEx/api/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReCodEx/api/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/ReCodEx/api/statuses/78fc26b7ef018c1652319a7f2d23d78fb580e129"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"krulis-martin"}}