{"action":"created","comment":{"url":"https://api.github.com/repos/all-of-us/workbench/pulls/comments/212152700","pull_request_review_id":148721094,"id":212152700,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjE1MjcwMA==","diff_hunk":"@@ -742,6 +743,50 @@ private FirecloudWorkspaceId generateFirecloudWorkspaceId(String namespace, Stri\n     return ResponseEntity.ok(response);\n   }\n \n+  @Override\n+  public ResponseEntity<FileDetail> renameNotebook(String workspace, String workspaceName, NotebookRename rename) {\n+    String fromBucket = fireCloudService.getWorkspace(workspace, workspaceName)\n+      .getWorkspace()\n+      .getBucketName();\n+    String origPath = NOTEBOOKS_WORKSPACE_DIRECTORY+ \"/\" + rename.getName();\n+    String newName = rename.getNewName();\n+    if (!newName.matches(\"^.+\\\\.ipynb\")) {\n+      newName = newName + \".ipynb\";\n+    }\n+    String newPath = NOTEBOOKS_WORKSPACE_DIRECTORY + \"/\" + newName;\n+    BlobId blobId = BlobId.of(fromBucket, origPath);\n+    cloudStorageService.copyBlob(blobId, BlobId.of(fromBucket, newPath));\n+    cloudStorageService.deleteBlob(blobId);\n+    FileDetail fileDetail = new FileDetail();\n+    fileDetail.setName(newName);\n+    fileDetail.setPath(\"gs://\" + fromBucket + \"/\" + NOTEBOOKS_WORKSPACE_DIRECTORY + \"/\" + newName);\n+    Timestamp now = new Timestamp(clock.instant().toEpochMilli());\n+    fileDetail.setLastModifiedTime(now.getTime());\n+    return ResponseEntity.ok(fileDetail);\n+  }\n+\n+  @Override\n+  public ResponseEntity<EmptyResponse> cloneNotebook(String workspace, String workspaceName, String notebookName) {\n+    String fromBucket = fireCloudService.getWorkspace(workspace, workspaceName)\n+      .getWorkspace()\n+      .getBucketName();\n+    String origPath = NOTEBOOKS_WORKSPACE_DIRECTORY + \"/\" + notebookName;\n+    String newPath = NOTEBOOKS_WORKSPACE_DIRECTORY + \"/\" + notebookName.replaceAll(\"\\\\.ipynb\", \" \") + \"Clone.ipynb\";","path":"api/src/main/java/org/pmiops/workbench/api/WorkspacesController.java","position":40,"original_position":40,"commit_id":"8b4d0502f5b4b862a4a011d5af6013ae7826a013","original_commit_id":"8b4d0502f5b4b862a4a011d5af6013ae7826a013","user":{"login":"calbach","id":822298,"node_id":"MDQ6VXNlcjgyMjI5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/822298?v=4","gravatar_id":"","url":"https://api.github.com/users/calbach","html_url":"https://github.com/calbach","followers_url":"https://api.github.com/users/calbach/followers","following_url":"https://api.github.com/users/calbach/following{/other_user}","gists_url":"https://api.github.com/users/calbach/gists{/gist_id}","starred_url":"https://api.github.com/users/calbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calbach/subscriptions","organizations_url":"https://api.github.com/users/calbach/orgs","repos_url":"https://api.github.com/users/calbach/repos","events_url":"https://api.github.com/users/calbach/events{/privacy}","received_events_url":"https://api.github.com/users/calbach/received_events","type":"User","site_admin":false},"body":"For workspaces, we name them \"Clone of X\" by default. May make sense to use the same convention here.","created_at":"2018-08-23T00:38:53Z","updated_at":"2018-08-23T00:44:28Z","html_url":"https://github.com/all-of-us/workbench/pull/1111#discussion_r212152700","pull_request_url":"https://api.github.com/repos/all-of-us/workbench/pulls/1111","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/comments/212152700"},"html":{"href":"https://github.com/all-of-us/workbench/pull/1111#discussion_r212152700"},"pull_request":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/1111"}}},"pull_request":{"url":"https://api.github.com/repos/all-of-us/workbench/pulls/1111","id":209621154,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NjIxMTU0","html_url":"https://github.com/all-of-us/workbench/pull/1111","diff_url":"https://github.com/all-of-us/workbench/pull/1111.diff","patch_url":"https://github.com/all-of-us/workbench/pull/1111.patch","issue_url":"https://api.github.com/repos/all-of-us/workbench/issues/1111","number":1111,"state":"open","locked":false,"title":"[RW-857][Risk=no] Notebook Actions","user":{"login":"UrsaStutsman","id":2631914,"node_id":"MDQ6VXNlcjI2MzE5MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2631914?v=4","gravatar_id":"","url":"https://api.github.com/users/UrsaStutsman","html_url":"https://github.com/UrsaStutsman","followers_url":"https://api.github.com/users/UrsaStutsman/followers","following_url":"https://api.github.com/users/UrsaStutsman/following{/other_user}","gists_url":"https://api.github.com/users/UrsaStutsman/gists{/gist_id}","starred_url":"https://api.github.com/users/UrsaStutsman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UrsaStutsman/subscriptions","organizations_url":"https://api.github.com/users/UrsaStutsman/orgs","repos_url":"https://api.github.com/users/UrsaStutsman/repos","events_url":"https://api.github.com/users/UrsaStutsman/events{/privacy}","received_events_url":"https://api.github.com/users/UrsaStutsman/received_events","type":"User","site_admin":false},"body":"Ready for first round of reviews. I am currently writing tests for the api and ui.\r\nThis PR is to add the Clone, Rename and Delete actions to notebooks.\r\nWhile working on this I noticed some issues with styling of the cards in the headers. I have created a JIRA ticket to address these issues since they are not limited to these cards (also on cohort cards). That ticket is: https://precisionmedicineinitiative.atlassian.net/browse/RW-1194","created_at":"2018-08-20T19:35:16Z","updated_at":"2018-08-23T00:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af3b385b8a4a49b518ce8908b70dfe5d210ab805","assignee":null,"assignees":[],"requested_reviewers":[{"login":"danqrodney","id":12536316,"node_id":"MDQ6VXNlcjEyNTM2MzE2","avatar_url":"https://avatars0.githubusercontent.com/u/12536316?v=4","gravatar_id":"","url":"https://api.github.com/users/danqrodney","html_url":"https://github.com/danqrodney","followers_url":"https://api.github.com/users/danqrodney/followers","following_url":"https://api.github.com/users/danqrodney/following{/other_user}","gists_url":"https://api.github.com/users/danqrodney/gists{/gist_id}","starred_url":"https://api.github.com/users/danqrodney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danqrodney/subscriptions","organizations_url":"https://api.github.com/users/danqrodney/orgs","repos_url":"https://api.github.com/users/danqrodney/repos","events_url":"https://api.github.com/users/danqrodney/events{/privacy}","received_events_url":"https://api.github.com/users/danqrodney/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/all-of-us/workbench/pulls/1111/commits","review_comments_url":"https://api.github.com/repos/all-of-us/workbench/pulls/1111/comments","review_comment_url":"https://api.github.com/repos/all-of-us/workbench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/all-of-us/workbench/issues/1111/comments","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/8b4d0502f5b4b862a4a011d5af6013ae7826a013","head":{"label":"all-of-us:us/rw-857","ref":"us/rw-857","sha":"8b4d0502f5b4b862a4a011d5af6013ae7826a013","user":{"login":"all-of-us","id":22846942,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODQ2OTQy","avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":95247186,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0NzE4Ng==","name":"workbench","full_name":"all-of-us/workbench","owner":{"login":"all-of-us","id":22846942,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODQ2OTQy","avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/workbench","description":"All of Us Researcher Workbench","fork":false,"url":"https://api.github.com/repos/all-of-us/workbench","forks_url":"https://api.github.com/repos/all-of-us/workbench/forks","keys_url":"https://api.github.com/repos/all-of-us/workbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/workbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/workbench/teams","hooks_url":"https://api.github.com/repos/all-of-us/workbench/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/workbench/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/workbench/events","assignees_url":"https://api.github.com/repos/all-of-us/workbench/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/workbench/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/workbench/tags","blobs_url":"https://api.github.com/repos/all-of-us/workbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/workbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/workbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/workbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/workbench/languages","stargazers_url":"https://api.github.com/repos/all-of-us/workbench/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/workbench/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/workbench/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/workbench/subscription","commits_url":"https://api.github.com/repos/all-of-us/workbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/workbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/workbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/workbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/workbench/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/workbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/workbench/merges","archive_url":"https://api.github.com/repos/all-of-us/workbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/workbench/downloads","issues_url":"https://api.github.com/repos/all-of-us/workbench/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/workbench/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/workbench/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/workbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/workbench/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/workbench/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/workbench/deployments","created_at":"2017-06-23T18:44:24Z","updated_at":"2018-08-22T18:33:47Z","pushed_at":"2018-08-22T22:41:47Z","git_url":"git://github.com/all-of-us/workbench.git","ssh_url":"git@github.com:all-of-us/workbench.git","clone_url":"https://github.com/all-of-us/workbench.git","svn_url":"https://github.com/all-of-us/workbench","homepage":"","size":176559,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":7,"watchers":7,"default_branch":"master"}},"base":{"label":"all-of-us:master","ref":"master","sha":"e2ddc6062ac3f337d3ae563c0b43542c0e283650","user":{"login":"all-of-us","id":22846942,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODQ2OTQy","avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":95247186,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0NzE4Ng==","name":"workbench","full_name":"all-of-us/workbench","owner":{"login":"all-of-us","id":22846942,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODQ2OTQy","avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/workbench","description":"All of Us Researcher Workbench","fork":false,"url":"https://api.github.com/repos/all-of-us/workbench","forks_url":"https://api.github.com/repos/all-of-us/workbench/forks","keys_url":"https://api.github.com/repos/all-of-us/workbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/workbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/workbench/teams","hooks_url":"https://api.github.com/repos/all-of-us/workbench/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/workbench/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/workbench/events","assignees_url":"https://api.github.com/repos/all-of-us/workbench/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/workbench/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/workbench/tags","blobs_url":"https://api.github.com/repos/all-of-us/workbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/workbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/workbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/workbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/workbench/languages","stargazers_url":"https://api.github.com/repos/all-of-us/workbench/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/workbench/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/workbench/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/workbench/subscription","commits_url":"https://api.github.com/repos/all-of-us/workbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/workbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/workbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/workbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/workbench/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/workbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/workbench/merges","archive_url":"https://api.github.com/repos/all-of-us/workbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/workbench/downloads","issues_url":"https://api.github.com/repos/all-of-us/workbench/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/workbench/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/workbench/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/workbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/workbench/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/workbench/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/workbench/deployments","created_at":"2017-06-23T18:44:24Z","updated_at":"2018-08-22T18:33:47Z","pushed_at":"2018-08-22T22:41:47Z","git_url":"git://github.com/all-of-us/workbench.git","ssh_url":"git@github.com:all-of-us/workbench.git","clone_url":"https://github.com/all-of-us/workbench.git","svn_url":"https://github.com/all-of-us/workbench","homepage":"","size":176559,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":7,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/1111"},"html":{"href":"https://github.com/all-of-us/workbench/pull/1111"},"issue":{"href":"https://api.github.com/repos/all-of-us/workbench/issues/1111"},"comments":{"href":"https://api.github.com/repos/all-of-us/workbench/issues/1111/comments"},"review_comments":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/1111/comments"},"review_comment":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/1111/commits"},"statuses":{"href":"https://api.github.com/repos/all-of-us/workbench/statuses/8b4d0502f5b4b862a4a011d5af6013ae7826a013"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"calbach"}}