{"action":"created","comment":{"url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/comments/79621849","id":79621849,"diff_hunk":"@@ -0,0 +1,199 @@\n+/**\n+ * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH\n+ * License: MPL-2.0\n+ */\n+package org.genivi.sota.core.db\n+\n+import eu.timepit.refined.refineV\n+import java.time.Instant\n+import java.util.UUID\n+import org.genivi.sota.core.data.Campaign\n+import org.genivi.sota.core.SotaCoreErrors\n+import org.genivi.sota.data.{GroupInfo, Namespace, PackageId}\n+import org.genivi.sota.db.SlickExtensions._\n+import scala.concurrent.ExecutionContext\n+import scala.util.{Failure, Success}\n+import slick.driver.MySQLDriver.api._\n+\n+object Campaigns {\n+  import org.genivi.sota.refined.SlickRefined._\n+  import Campaign._\n+\n+  // scalastyle:off\n+  class CampaignTable(tag: Tag) extends Table[CampaignMeta](tag, \"Campaign\") {\n+    def id = column[Id](\"uuid\")\n+    def namespace = column[Namespace](\"namespace\")\n+    def name = column[String](\"name\")\n+    def launched = column[Boolean](\"launched\")\n+    def packageName = column[PackageId.Name](\"package_name\")\n+    def packageVersion = column[PackageId.Version](\"package_version\")\n+\n+    def pk = primaryKey(\"pk_campaign\", id)\n+\n+    private def mPackageId(name0: Option[PackageId.Name],\n+                           version0: Option[PackageId.Version]): Option[PackageId] = for\n+      { name <- name0\n+        version <- version0\n+      } yield PackageId(name, version)\n+\n+    def * = (id, namespace, name, launched, packageName.?, packageVersion.?).shaped <>\n+      ({case (id,ns, name, launched, pkgName, pkgVer) =>\n+        CampaignMeta(id,ns, name, launched, mPackageId(pkgName, pkgVer))},\n+       (x: CampaignMeta) => Some ((x.id, x.namespace, x.name, x.launched,\n+                                   x.packageId.map(_.name), x.packageId.map(_.version))))\n+  }\n+\n+  class CampaignGroups(tag: Tag) extends Table[(Campaign.Id, GroupInfo.Name)](tag, \"CampaignGroups\") {\n+    def campaignId = column[Campaign.Id](\"campaign_id\")\n+    def group = column[GroupInfo.Name](\"group_name\")\n+\n+    def pk = primaryKey(\"pk_campaign_group\", (campaignId, group))\n+\n+    def * = (campaignId, group)\n+\n+  }\n+  // scalastyle:on\n+\n+  val campaignsMeta = TableQuery[CampaignTable]\n+  val campaignsGroups = TableQuery[CampaignGroups]\n+\n+  def canEdit(ns: Namespace, id: Id)\n+             (implicit ec: ExecutionContext): DBIO[CampaignMeta] =\n+    exists(ns, id).flatMap { camp =>\n+      if (camp.launched){ DBIO.failed(SotaCoreErrors.CampaignLaunched) }\n+       else {DBIO.successful(camp) }\n+    }\n+\n+  def create(ns: Namespace, name: String)\n+            (implicit ec: ExecutionContext): DBIO[Campaign.Id] = {\n+    val id: Id = Id(refineV[ValidId](UUID.randomUUID.toString).right.get)\n+\n+    val dbIO = for {\n+      _ <- exists(id).asTry.flatMap {\n+        case Success(_) => DBIO.failed(SotaCoreErrors.ConflictingCampaign)\n+        case Failure(_) => DBIO.successful(())\n+      }\n+      _ <- notConflicts(ns, name)\n+      _ <- campaignsMeta += CampaignMeta(id, ns, name)\n+    } yield id\n+\n+    dbIO.transactionally\n+  }\n+\n+  def delete(ns: Namespace, id: Id)\n+            (implicit ec: ExecutionContext): DBIO[Unit] = {\n+    val dbIO = for {\n+      _ <- exists(ns, id)\n+      _ <- campaignsMeta.filter(c => c.namespace === ns && c.id === id).delete\n+      _ <- campaignsGroups.filter(_.campaignId === id).delete\n+    } yield ()\n+\n+    dbIO.transactionally\n+  }\n+\n+  def exists(id: Id)\n+            (implicit ec: ExecutionContext): DBIO[CampaignMeta] =\n+    campaignsMeta\n+      .filter(_.id === id)\n+      .result\n+      .headOption\n+      .flatMap(_.fold[DBIO[CampaignMeta]](DBIO.failed(SotaCoreErrors.MissingCampaign))(DBIO.successful))\n+\n+\n+  def exists(ns: Namespace, id: Id)\n+            (implicit ec: ExecutionContext): DBIO[CampaignMeta] =\n+    campaignsMeta\n+      .filter(c => c.namespace === ns && c.id === id)\n+      .result\n+      .headOption\n+      .flatMap(_.fold[DBIO[CampaignMeta]](DBIO.failed(SotaCoreErrors.MissingCampaign))(DBIO.successful))\n+\n+\n+  def fetch(ns: Namespace, id: Id)\n+           (implicit ec: ExecutionContext): DBIO[Campaign] = {\n+    val dbIO = for {\n+      meta <- exists(ns, id)\n+      groups <- fetchGroups(id)\n+    } yield Campaign(meta, groups)\n+\n+    dbIO.transactionally\n+  }\n+\n+  def fetchGroups(id: Id)\n+                 (implicit ec: ExecutionContext): DBIO[Seq[GroupInfo.Name]] =\n+    campaignsGroups\n+      .filter(_.campaignId === id)\n+      .result\n+      .map (_.map(_._2))\n+\n+  def list(ns: Namespace): DBIO[Seq[CampaignMeta]] = campaignsMeta.filter(_.namespace === ns).result\n+\n+  def notConflicts(ns: Namespace, name: String)\n+                  (implicit ec: ExecutionContext): DBIO[Unit] =\n+    campaignsMeta\n+      .filter(_.namespace === ns)\n+      .filter(_.name === name)\n+      .exists\n+      .result\n+      .flatMap(if (_) DBIO.failed(SotaCoreErrors.ConflictingCampaign) else DBIO.successful(()))\n+\n+  def setAsDraft(ns: Namespace, id:Id)\n+                (implicit ec: ExecutionContext): DBIO[Unit] = {\n+    val dbIO = for {\n+      camp <- exists(ns, id)","path":"core/src/main/scala/org/genivi/sota/core/db/Campaigns.scala","position":143,"original_position":143,"commit_id":"12fd32ea9498883f6229174d5d91e81671fae51c","original_commit_id":"12fd32ea9498883f6229174d5d91e81671fae51c","user":{"login":"simao","id":203575,"avatar_url":"https://avatars.githubusercontent.com/u/203575?v=3","gravatar_id":"","url":"https://api.github.com/users/simao","html_url":"https://github.com/simao","followers_url":"https://api.github.com/users/simao/followers","following_url":"https://api.github.com/users/simao/following{/other_user}","gists_url":"https://api.github.com/users/simao/gists{/gist_id}","starred_url":"https://api.github.com/users/simao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simao/subscriptions","organizations_url":"https://api.github.com/users/simao/orgs","repos_url":"https://api.github.com/users/simao/repos","events_url":"https://api.github.com/users/simao/events{/privacy}","received_events_url":"https://api.github.com/users/simao/received_events","type":"User","site_admin":false},"body":"There are a few more but you get the idea.","created_at":"2016-09-20T14:20:25Z","updated_at":"2016-09-20T14:20:25Z","html_url":"https://github.com/advancedtelematic/rvi_sota_server/pull/570#discussion_r79621849","pull_request_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570","_links":{"self":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/comments/79621849"},"html":{"href":"https://github.com/advancedtelematic/rvi_sota_server/pull/570#discussion_r79621849"},"pull_request":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570"}}},"pull_request":{"url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570","id":85573003,"html_url":"https://github.com/advancedtelematic/rvi_sota_server/pull/570","diff_url":"https://github.com/advancedtelematic/rvi_sota_server/pull/570.diff","patch_url":"https://github.com/advancedtelematic/rvi_sota_server/pull/570.patch","issue_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/570","number":570,"state":"open","locked":false,"title":"[PRO-1391] Add campaigns","user":{"login":"Danten","id":101181,"avatar_url":"https://avatars.githubusercontent.com/u/101181?v=3","gravatar_id":"","url":"https://api.github.com/users/Danten","html_url":"https://github.com/Danten","followers_url":"https://api.github.com/users/Danten/followers","following_url":"https://api.github.com/users/Danten/following{/other_user}","gists_url":"https://api.github.com/users/Danten/gists{/gist_id}","starred_url":"https://api.github.com/users/Danten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Danten/subscriptions","organizations_url":"https://api.github.com/users/Danten/orgs","repos_url":"https://api.github.com/users/Danten/repos","events_url":"https://api.github.com/users/Danten/events{/privacy}","received_events_url":"https://api.github.com/users/Danten/received_events","type":"User","site_admin":false},"body":"https://advancedtelematic.atlassian.net/browse/PRO-1391\r\n\r\nAdd parent campaign, which is for one package with several groups of devices.","created_at":"2016-09-16T13:27:10Z","updated_at":"2016-09-20T14:20:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81d3ceeb01e9e0bc31d01a4bea490ff6c62cf8d6","assignee":{"login":"simao","id":203575,"avatar_url":"https://avatars.githubusercontent.com/u/203575?v=3","gravatar_id":"","url":"https://api.github.com/users/simao","html_url":"https://github.com/simao","followers_url":"https://api.github.com/users/simao/followers","following_url":"https://api.github.com/users/simao/following{/other_user}","gists_url":"https://api.github.com/users/simao/gists{/gist_id}","starred_url":"https://api.github.com/users/simao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simao/subscriptions","organizations_url":"https://api.github.com/users/simao/orgs","repos_url":"https://api.github.com/users/simao/repos","events_url":"https://api.github.com/users/simao/events{/privacy}","received_events_url":"https://api.github.com/users/simao/received_events","type":"User","site_admin":false},"assignees":[{"login":"simao","id":203575,"avatar_url":"https://avatars.githubusercontent.com/u/203575?v=3","gravatar_id":"","url":"https://api.github.com/users/simao","html_url":"https://github.com/simao","followers_url":"https://api.github.com/users/simao/followers","following_url":"https://api.github.com/users/simao/following{/other_user}","gists_url":"https://api.github.com/users/simao/gists{/gist_id}","starred_url":"https://api.github.com/users/simao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simao/subscriptions","organizations_url":"https://api.github.com/users/simao/orgs","repos_url":"https://api.github.com/users/simao/repos","events_url":"https://api.github.com/users/simao/events{/privacy}","received_events_url":"https://api.github.com/users/simao/received_events","type":"User","site_admin":false},{"login":"CalumMcCall","id":821201,"avatar_url":"https://avatars.githubusercontent.com/u/821201?v=3","gravatar_id":"","url":"https://api.github.com/users/CalumMcCall","html_url":"https://github.com/CalumMcCall","followers_url":"https://api.github.com/users/CalumMcCall/followers","following_url":"https://api.github.com/users/CalumMcCall/following{/other_user}","gists_url":"https://api.github.com/users/CalumMcCall/gists{/gist_id}","starred_url":"https://api.github.com/users/CalumMcCall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CalumMcCall/subscriptions","organizations_url":"https://api.github.com/users/CalumMcCall/orgs","repos_url":"https://api.github.com/users/CalumMcCall/repos","events_url":"https://api.github.com/users/CalumMcCall/events{/privacy}","received_events_url":"https://api.github.com/users/CalumMcCall/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570/commits","review_comments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570/comments","review_comment_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/570/comments","statuses_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/statuses/12fd32ea9498883f6229174d5d91e81671fae51c","head":{"label":"advancedtelematic:feat/PRO-1391/add-campaign","ref":"feat/PRO-1391/add-campaign","sha":"12fd32ea9498883f6229174d5d91e81671fae51c","user":{"login":"advancedtelematic","id":7944633,"avatar_url":"https://avatars.githubusercontent.com/u/7944633?v=3","gravatar_id":"","url":"https://api.github.com/users/advancedtelematic","html_url":"https://github.com/advancedtelematic","followers_url":"https://api.github.com/users/advancedtelematic/followers","following_url":"https://api.github.com/users/advancedtelematic/following{/other_user}","gists_url":"https://api.github.com/users/advancedtelematic/gists{/gist_id}","starred_url":"https://api.github.com/users/advancedtelematic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advancedtelematic/subscriptions","organizations_url":"https://api.github.com/users/advancedtelematic/orgs","repos_url":"https://api.github.com/users/advancedtelematic/repos","events_url":"https://api.github.com/users/advancedtelematic/events{/privacy}","received_events_url":"https://api.github.com/users/advancedtelematic/received_events","type":"Organization","site_admin":false},"repo":{"id":41109281,"name":"rvi_sota_server","full_name":"advancedtelematic/rvi_sota_server","owner":{"login":"advancedtelematic","id":7944633,"avatar_url":"https://avatars.githubusercontent.com/u/7944633?v=3","gravatar_id":"","url":"https://api.github.com/users/advancedtelematic","html_url":"https://github.com/advancedtelematic","followers_url":"https://api.github.com/users/advancedtelematic/followers","following_url":"https://api.github.com/users/advancedtelematic/following{/other_user}","gists_url":"https://api.github.com/users/advancedtelematic/gists{/gist_id}","starred_url":"https://api.github.com/users/advancedtelematic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advancedtelematic/subscriptions","organizations_url":"https://api.github.com/users/advancedtelematic/orgs","repos_url":"https://api.github.com/users/advancedtelematic/repos","events_url":"https://api.github.com/users/advancedtelematic/events{/privacy}","received_events_url":"https://api.github.com/users/advancedtelematic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/advancedtelematic/rvi_sota_server","description":"SOTA Reference Implementation project - Server","fork":true,"url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server","forks_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/forks","keys_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/teams","hooks_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/hooks","issue_events_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/events{/number}","events_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/events","assignees_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/assignees{/user}","branches_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/branches{/branch}","tags_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/tags","blobs_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/statuses/{sha}","languages_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/languages","stargazers_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/stargazers","contributors_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/contributors","subscribers_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/subscribers","subscription_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/subscription","commits_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/contents/{+path}","compare_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/merges","archive_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/downloads","issues_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues{/number}","pulls_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls{/number}","milestones_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/milestones{/number}","notifications_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/labels{/name}","releases_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/releases{/id}","deployments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/deployments","created_at":"2015-08-20T17:22:41Z","updated_at":"2016-09-13T07:54:51Z","pushed_at":"2016-09-20T13:52:14Z","git_url":"git://github.com/advancedtelematic/rvi_sota_server.git","ssh_url":"git@github.com:advancedtelematic/rvi_sota_server.git","clone_url":"https://github.com/advancedtelematic/rvi_sota_server.git","svn_url":"https://github.com/advancedtelematic/rvi_sota_server","homepage":null,"size":18815,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":4,"default_branch":"master"}},"base":{"label":"advancedtelematic:master","ref":"master","sha":"e6372efd05472ce9051b34516a2de0d99b1a22da","user":{"login":"advancedtelematic","id":7944633,"avatar_url":"https://avatars.githubusercontent.com/u/7944633?v=3","gravatar_id":"","url":"https://api.github.com/users/advancedtelematic","html_url":"https://github.com/advancedtelematic","followers_url":"https://api.github.com/users/advancedtelematic/followers","following_url":"https://api.github.com/users/advancedtelematic/following{/other_user}","gists_url":"https://api.github.com/users/advancedtelematic/gists{/gist_id}","starred_url":"https://api.github.com/users/advancedtelematic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advancedtelematic/subscriptions","organizations_url":"https://api.github.com/users/advancedtelematic/orgs","repos_url":"https://api.github.com/users/advancedtelematic/repos","events_url":"https://api.github.com/users/advancedtelematic/events{/privacy}","received_events_url":"https://api.github.com/users/advancedtelematic/received_events","type":"Organization","site_admin":false},"repo":{"id":41109281,"name":"rvi_sota_server","full_name":"advancedtelematic/rvi_sota_server","owner":{"login":"advancedtelematic","id":7944633,"avatar_url":"https://avatars.githubusercontent.com/u/7944633?v=3","gravatar_id":"","url":"https://api.github.com/users/advancedtelematic","html_url":"https://github.com/advancedtelematic","followers_url":"https://api.github.com/users/advancedtelematic/followers","following_url":"https://api.github.com/users/advancedtelematic/following{/other_user}","gists_url":"https://api.github.com/users/advancedtelematic/gists{/gist_id}","starred_url":"https://api.github.com/users/advancedtelematic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advancedtelematic/subscriptions","organizations_url":"https://api.github.com/users/advancedtelematic/orgs","repos_url":"https://api.github.com/users/advancedtelematic/repos","events_url":"https://api.github.com/users/advancedtelematic/events{/privacy}","received_events_url":"https://api.github.com/users/advancedtelematic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/advancedtelematic/rvi_sota_server","description":"SOTA Reference Implementation project - Server","fork":true,"url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server","forks_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/forks","keys_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/teams","hooks_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/hooks","issue_events_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/events{/number}","events_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/events","assignees_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/assignees{/user}","branches_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/branches{/branch}","tags_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/tags","blobs_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/statuses/{sha}","languages_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/languages","stargazers_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/stargazers","contributors_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/contributors","subscribers_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/subscribers","subscription_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/subscription","commits_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/contents/{+path}","compare_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/merges","archive_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/downloads","issues_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues{/number}","pulls_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls{/number}","milestones_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/milestones{/number}","notifications_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/labels{/name}","releases_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/releases{/id}","deployments_url":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/deployments","created_at":"2015-08-20T17:22:41Z","updated_at":"2016-09-13T07:54:51Z","pushed_at":"2016-09-20T13:52:14Z","git_url":"git://github.com/advancedtelematic/rvi_sota_server.git","ssh_url":"git@github.com:advancedtelematic/rvi_sota_server.git","clone_url":"https://github.com/advancedtelematic/rvi_sota_server.git","svn_url":"https://github.com/advancedtelematic/rvi_sota_server","homepage":null,"size":18815,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570"},"html":{"href":"https://github.com/advancedtelematic/rvi_sota_server/pull/570"},"issue":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/570"},"comments":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/issues/570/comments"},"review_comments":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570/comments"},"review_comment":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/pulls/570/commits"},"statuses":{"href":"https://api.github.com/repos/advancedtelematic/rvi_sota_server/statuses/12fd32ea9498883f6229174d5d91e81671fae51c"}}}}
{"actor":{"display_login":"simao"}}