{"action":"created","comment":{"url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments/33893738","id":33893738,"diff_hunk":"@@ -0,0 +1,57 @@\n+package models.services\n+\n+import java.util.UUID\n+import javax.inject.Inject\n+\n+import models.Repository\n+import models.daos.RepositoryDAO\n+\n+import scala.concurrent.Future\n+import scala.concurrent.ExecutionContext.Implicits.global\n+\n+class RepositoryService @Inject() (repoDAO: RepositoryDAO) {\n+\n+  /**\n+   * Saves or create a repository to the database according to the current needs\n+   *\n+   * @param name name of the repo to save or update\n+   * @param addedLines number of added lines to the repo\n+   * @param removedLines number of deleted lines from the repo\n+   * @param score score of the repo\n+   * @return the saved user\n+   */\n+  def save(name: String, addedLines: Option[Int], removedLines: Option[Int], score: Option[Int]): Future[Repository] = {\n+    repoDAO.find(name).flatMap({","path":"app/models/services/RepositoryService.scala","position":24,"original_position":24,"commit_id":"3f316f0d1c031e3f913a36038cc71f5dc1fc9347","original_commit_id":"3f316f0d1c031e3f913a36038cc71f5dc1fc9347","user":{"login":"callicles","id":4429209,"avatar_url":"https://avatars.githubusercontent.com/u/4429209?v=3","gravatar_id":"","url":"https://api.github.com/users/callicles","html_url":"https://github.com/callicles","followers_url":"https://api.github.com/users/callicles/followers","following_url":"https://api.github.com/users/callicles/following{/other_user}","gists_url":"https://api.github.com/users/callicles/gists{/gist_id}","starred_url":"https://api.github.com/users/callicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callicles/subscriptions","organizations_url":"https://api.github.com/users/callicles/orgs","repos_url":"https://api.github.com/users/callicles/repos","events_url":"https://api.github.com/users/callicles/events{/privacy}","received_events_url":"https://api.github.com/users/callicles/received_events","type":"User","site_admin":false},"body":"With `map` the function won't return a `Future[Repository]` \r\nError message: `Future[Repository] cannot conform to type _s`","created_at":"2015-07-05T10:40:31Z","updated_at":"2015-07-05T10:40:31Z","html_url":"https://github.com/gitlinks/gitrank-web/pull/15#discussion_r33893738","pull_request_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments/33893738"},"html":{"href":"https://github.com/gitlinks/gitrank-web/pull/15#discussion_r33893738"},"pull_request":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15","id":39210337,"html_url":"https://github.com/gitlinks/gitrank-web/pull/15","diff_url":"https://github.com/gitlinks/gitrank-web/pull/15.diff","patch_url":"https://github.com/gitlinks/gitrank-web/pull/15.patch","issue_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/15","number":15,"state":"open","locked":false,"title":"Feature/repository dao","user":{"login":"callicles","id":4429209,"avatar_url":"https://avatars.githubusercontent.com/u/4429209?v=3","gravatar_id":"","url":"https://api.github.com/users/callicles","html_url":"https://github.com/callicles","followers_url":"https://api.github.com/users/callicles/followers","following_url":"https://api.github.com/users/callicles/following{/other_user}","gists_url":"https://api.github.com/users/callicles/gists{/gist_id}","starred_url":"https://api.github.com/users/callicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callicles/subscriptions","organizations_url":"https://api.github.com/users/callicles/orgs","repos_url":"https://api.github.com/users/callicles/repos","events_url":"https://api.github.com/users/callicles/events{/privacy}","received_events_url":"https://api.github.com/users/callicles/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-04T17:00:43Z","updated_at":"2015-07-05T10:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0b99854ad18a955c40d8593047aa7dcc48ead2a","assignee":{"login":"jacobtardieu","id":3583628,"avatar_url":"https://avatars.githubusercontent.com/u/3583628?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobtardieu","html_url":"https://github.com/jacobtardieu","followers_url":"https://api.github.com/users/jacobtardieu/followers","following_url":"https://api.github.com/users/jacobtardieu/following{/other_user}","gists_url":"https://api.github.com/users/jacobtardieu/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobtardieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobtardieu/subscriptions","organizations_url":"https://api.github.com/users/jacobtardieu/orgs","repos_url":"https://api.github.com/users/jacobtardieu/repos","events_url":"https://api.github.com/users/jacobtardieu/events{/privacy}","received_events_url":"https://api.github.com/users/jacobtardieu/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15/commits","review_comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15/comments","review_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/15/comments","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/3f316f0d1c031e3f913a36038cc71f5dc1fc9347","head":{"label":"gitlinks:feature/RepositoryDAO","ref":"feature/RepositoryDAO","sha":"3f316f0d1c031e3f913a36038cc71f5dc1fc9347","user":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"repo":{"id":36321709,"name":"gitrank-web","full_name":"gitlinks/gitrank-web","owner":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlinks/gitrank-web","description":"Web Play/Scala application delivery gitrank frontend.","fork":false,"url":"https://api.github.com/repos/gitlinks/gitrank-web","forks_url":"https://api.github.com/repos/gitlinks/gitrank-web/forks","keys_url":"https://api.github.com/repos/gitlinks/gitrank-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlinks/gitrank-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlinks/gitrank-web/teams","hooks_url":"https://api.github.com/repos/gitlinks/gitrank-web/hooks","issue_events_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/events{/number}","events_url":"https://api.github.com/repos/gitlinks/gitrank-web/events","assignees_url":"https://api.github.com/repos/gitlinks/gitrank-web/assignees{/user}","branches_url":"https://api.github.com/repos/gitlinks/gitrank-web/branches{/branch}","tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/tags","blobs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlinks/gitrank-web/languages","stargazers_url":"https://api.github.com/repos/gitlinks/gitrank-web/stargazers","contributors_url":"https://api.github.com/repos/gitlinks/gitrank-web/contributors","subscribers_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscribers","subscription_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscription","commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlinks/gitrank-web/contents/{+path}","compare_url":"https://api.github.com/repos/gitlinks/gitrank-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlinks/gitrank-web/merges","archive_url":"https://api.github.com/repos/gitlinks/gitrank-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlinks/gitrank-web/downloads","issues_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues{/number}","pulls_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlinks/gitrank-web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlinks/gitrank-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlinks/gitrank-web/labels{/name}","releases_url":"https://api.github.com/repos/gitlinks/gitrank-web/releases{/id}","created_at":"2015-05-26T20:25:21Z","updated_at":"2015-06-28T11:44:12Z","pushed_at":"2015-07-04T17:00:43Z","git_url":"git://github.com/gitlinks/gitrank-web.git","ssh_url":"git@github.com:gitlinks/gitrank-web.git","clone_url":"https://github.com/gitlinks/gitrank-web.git","svn_url":"https://github.com/gitlinks/gitrank-web","homepage":null,"size":1328,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":2,"default_branch":"master"}},"base":{"label":"gitlinks:develop","ref":"develop","sha":"b95aa30d5433a3e662e2845abacd9c92d5aab50a","user":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"repo":{"id":36321709,"name":"gitrank-web","full_name":"gitlinks/gitrank-web","owner":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlinks/gitrank-web","description":"Web Play/Scala application delivery gitrank frontend.","fork":false,"url":"https://api.github.com/repos/gitlinks/gitrank-web","forks_url":"https://api.github.com/repos/gitlinks/gitrank-web/forks","keys_url":"https://api.github.com/repos/gitlinks/gitrank-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlinks/gitrank-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlinks/gitrank-web/teams","hooks_url":"https://api.github.com/repos/gitlinks/gitrank-web/hooks","issue_events_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/events{/number}","events_url":"https://api.github.com/repos/gitlinks/gitrank-web/events","assignees_url":"https://api.github.com/repos/gitlinks/gitrank-web/assignees{/user}","branches_url":"https://api.github.com/repos/gitlinks/gitrank-web/branches{/branch}","tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/tags","blobs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlinks/gitrank-web/languages","stargazers_url":"https://api.github.com/repos/gitlinks/gitrank-web/stargazers","contributors_url":"https://api.github.com/repos/gitlinks/gitrank-web/contributors","subscribers_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscribers","subscription_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscription","commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlinks/gitrank-web/contents/{+path}","compare_url":"https://api.github.com/repos/gitlinks/gitrank-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlinks/gitrank-web/merges","archive_url":"https://api.github.com/repos/gitlinks/gitrank-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlinks/gitrank-web/downloads","issues_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues{/number}","pulls_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlinks/gitrank-web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlinks/gitrank-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlinks/gitrank-web/labels{/name}","releases_url":"https://api.github.com/repos/gitlinks/gitrank-web/releases{/id}","created_at":"2015-05-26T20:25:21Z","updated_at":"2015-06-28T11:44:12Z","pushed_at":"2015-07-04T17:00:43Z","git_url":"git://github.com/gitlinks/gitrank-web.git","ssh_url":"git@github.com:gitlinks/gitrank-web.git","clone_url":"https://github.com/gitlinks/gitrank-web.git","svn_url":"https://github.com/gitlinks/gitrank-web","homepage":null,"size":1328,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15"},"html":{"href":"https://github.com/gitlinks/gitrank-web/pull/15"},"issue":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/issues/15"},"comments":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/3f316f0d1c031e3f913a36038cc71f5dc1fc9347"}}}}