{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/203122476","pull_request_review_id":137950523,"id":203122476,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzEyMjQ3Ng==","diff_hunk":"@@ -0,0 +1,113 @@\n+#!/usr/bin/env amm\n+\n+interp.repositories() ++= Seq(\n+  coursier.maven.MavenRepository(\"https://oss.sonatype.org/content/repositories/snapshots/\"))\n+\n+@\n+import $ivy.`org.http4s::http4s-dsl:0.19.0-SNAPSHOT`\n+import $ivy.`org.http4s::http4s-blaze-server:0.19.0-SNAPSHOT`\n+import $ivy.`org.http4s::http4s-blaze-client:0.19.0-SNAPSHOT`\n+import $ivy.`com.google.cloud:google-cloud-storage:1.35.0`\n+import $ivy.`com.google.oauth-client:google-oauth-client:1.23.0`\n+import $ivy.`com.google.auth:google-auth-library-credentials:0.9.1`\n+import $ivy.`org.http4s::http4s-circe:0.19.0-SNAPSHOT`\n+import $ivy.`io.circe::circe-literal:0.7.0`\n+import $ivy.`io.spray::spray-json:1.3.4`\n+\n+import com.google.auth.oauth2.GoogleCredentials\n+import com.google.cloud.storage.Storage\n+import com.google.cloud.storage.StorageOptions\n+import com.google.common.collect.Lists\n+import com.google.cloud.ReadChannel\n+import java.io.ByteArrayInputStream\n+import java.io.FileInputStream\n+import java.io.FileOutputStream\n+import java.nio.file.Files\n+import java.nio.file.Paths\n+import org.http4s.client.blaze._\n+import cats.effect._\n+import org.http4s.dsl.io._\n+import org.http4s._\n+import org.http4s.circe._\n+import io.circe.literal._\n+import io.circe.syntax._\n+import spray.json._\n+import spray.json.DefaultJsonProtocol._\n+import scala.util.{Try, Success, Failure}\n+\n+object MarthaResponseJsonSupport extends DefaultJsonProtocol {\n+  implicit val urlFormat: JsonFormat[Url] = jsonFormat1(Url)\n+  implicit val dataObject: JsonFormat[DosDataObject] = jsonFormat1(DosDataObject)\n+  implicit val dosObjectFormat: JsonFormat[DosObject] = jsonFormat1(DosObject)\n+  implicit val marthaResponseFormat: JsonFormat[MarthaResponse] = jsonFormat2(MarthaResponse)\n+}\n+\n+case class Url(url: String)\n+\n+case class DosDataObject(urls: Array[Url])\n+\n+case class DosObject(data_object: DosDataObject)\n+\n+case class MarthaResponse(dos: DosObject, googleServiceAccount: JsObject)\n+\n+\n+@main\n+def dosUrlResolver(dosUrl: String, downloadLoc: String) : Unit = {\n+  val dosResloverObj = for {\n+    marthaResObj <- resolveDosThroughMartha(dosUrl)\n+    _ <- downloadFileFromGcs(marthaResObj.dos.data_object.urls(0).url, marthaResObj.googleServiceAccount.toString, downloadLoc)","path":"scripts/docker-dos/dosUrlLocalizer.sc","position":58,"original_position":58,"commit_id":"a25dd8c4fa4f893042474495667e022a5aeb0386","original_commit_id":"a25dd8c4fa4f893042474495667e022a5aeb0386","user":{"login":"salonishah11","id":16748522,"node_id":"MDQ6VXNlcjE2NzQ4NTIy","avatar_url":"https://avatars0.githubusercontent.com/u/16748522?v=4","gravatar_id":"","url":"https://api.github.com/users/salonishah11","html_url":"https://github.com/salonishah11","followers_url":"https://api.github.com/users/salonishah11/followers","following_url":"https://api.github.com/users/salonishah11/following{/other_user}","gists_url":"https://api.github.com/users/salonishah11/gists{/gist_id}","starred_url":"https://api.github.com/users/salonishah11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salonishah11/subscriptions","organizations_url":"https://api.github.com/users/salonishah11/orgs","repos_url":"https://api.github.com/users/salonishah11/repos","events_url":"https://api.github.com/users/salonishah11/events{/privacy}","received_events_url":"https://api.github.com/users/salonishah11/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2018-07-17T18:02:34Z","updated_at":"2018-07-17T18:02:35Z","html_url":"https://github.com/broadinstitute/cromwell/pull/3891#discussion_r203122476","pull_request_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/203122476"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/3891#discussion_r203122476"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891"}},"in_reply_to_id":202720274},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891","id":201139201,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMTM5MjAx","html_url":"https://github.com/broadinstitute/cromwell/pull/3891","diff_url":"https://github.com/broadinstitute/cromwell/pull/3891.diff","patch_url":"https://github.com/broadinstitute/cromwell/pull/3891.patch","issue_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/3891","number":3891,"state":"open","locked":false,"title":"DOS: Scala script and dockerfile","user":{"login":"salonishah11","id":16748522,"node_id":"MDQ6VXNlcjE2NzQ4NTIy","avatar_url":"https://avatars0.githubusercontent.com/u/16748522?v=4","gravatar_id":"","url":"https://api.github.com/users/salonishah11","html_url":"https://github.com/salonishah11","followers_url":"https://api.github.com/users/salonishah11/followers","following_url":"https://api.github.com/users/salonishah11/following{/other_user}","gists_url":"https://api.github.com/users/salonishah11/gists{/gist_id}","starred_url":"https://api.github.com/users/salonishah11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salonishah11/subscriptions","organizations_url":"https://api.github.com/users/salonishah11/orgs","repos_url":"https://api.github.com/users/salonishah11/repos","events_url":"https://api.github.com/users/salonishah11/events{/privacy}","received_events_url":"https://api.github.com/users/salonishah11/received_events","type":"User","site_admin":false},"body":"This PR adds Scala script and Dockerfile needed for resolving DOS Url and localizing it to the container. \r\n\r\nCloses #3834 ","created_at":"2018-07-12T22:08:34Z","updated_at":"2018-07-17T18:02:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9475cee419942e387968f09d834b493d0ca4bbe5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/3891/comments","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/a25dd8c4fa4f893042474495667e022a5aeb0386","head":{"label":"broadinstitute:ss_dos_script","ref":"ss_dos_script","sha":"a25dd8c4fa4f893042474495667e022a5aeb0386","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"node_id":"MDEwOlJlcG9zaXRvcnkzNDEzNjQwNg==","name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Scientific workflow engine designed for simplicity & scalability. Trivially transition between one off use cases to massive scale production environments","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2018-07-17T17:17:34Z","pushed_at":"2018-07-17T17:53:31Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"http://cromwell.readthedocs.io/","size":24615,"stargazers_count":275,"watchers_count":275,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":563,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":81,"open_issues":563,"watchers":275,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"2e15d9361c37b7dfabbeec526b5f85eb46eb917f","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"node_id":"MDEwOlJlcG9zaXRvcnkzNDEzNjQwNg==","name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Scientific workflow engine designed for simplicity & scalability. Trivially transition between one off use cases to massive scale production environments","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2018-07-17T17:17:34Z","pushed_at":"2018-07-17T17:53:31Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"http://cromwell.readthedocs.io/","size":24615,"stargazers_count":275,"watchers_count":275,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":563,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":81,"open_issues":563,"watchers":275,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/3891"},"issue":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/3891"},"comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/3891/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/3891/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/cromwell/statuses/a25dd8c4fa4f893042474495667e022a5aeb0386"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"salonishah11"}}