{"action":"created","comment":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/44628384","id":44628384,"diff_hunk":"@@ -709,18 +710,29 @@ def do_alias_command(self, args):\n         + EDIT_ARGUMENTS,\n     )\n     def do_upload_command(self, args):\n-        if self.headless:\n+        # If headless and no args provided, request an Upload dialog on the front end.\n+        if self.headless and not args.contents and not args.path:","path":"codalab/lib/bundle_cli.py","position":14,"original_position":14,"commit_id":"e9e1e85a0b6ddfa41bb738b77ee26350204739be","original_commit_id":"e9e1e85a0b6ddfa41bb738b77ee26350204739be","user":{"login":"percyliang","id":435384,"avatar_url":"https://avatars.githubusercontent.com/u/435384?v=3","gravatar_id":"","url":"https://api.github.com/users/percyliang","html_url":"https://github.com/percyliang","followers_url":"https://api.github.com/users/percyliang/followers","following_url":"https://api.github.com/users/percyliang/following{/other_user}","gists_url":"https://api.github.com/users/percyliang/gists{/gist_id}","starred_url":"https://api.github.com/users/percyliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percyliang/subscriptions","organizations_url":"https://api.github.com/users/percyliang/orgs","repos_url":"https://api.github.com/users/percyliang/repos","events_url":"https://api.github.com/users/percyliang/events{/privacy}","received_events_url":"https://api.github.com/users/percyliang/received_events","type":"User","site_admin":false},"body":"Use contents != None because contents could be ''","created_at":"2015-11-12T07:41:03Z","updated_at":"2015-11-12T07:41:03Z","html_url":"https://github.com/codalab/codalab-cli/pull/219#discussion_r44628384","pull_request_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/219","_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/44628384"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/219#discussion_r44628384"},"pull_request":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/219"}}},"pull_request":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/219","id":50480160,"html_url":"https://github.com/codalab/codalab-cli/pull/219","diff_url":"https://github.com/codalab/codalab-cli/pull/219.diff","patch_url":"https://github.com/codalab/codalab-cli/pull/219.patch","issue_url":"https://api.github.com/repos/codalab/codalab-cli/issues/219","number":219,"state":"open","locked":false,"title":"Handle upload properly when headless","user":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"body":"Fixes codalab/codalab#1377\r\n\r\n - `cl upload` opens the upload dialog\r\n - `cl upload -c \"string\"` executes immediately\r\n - Providing any non-URL path will respond with an error\r\n - Providing a URL alone will upload the resource at the URL as a bundle\r\n\r\n@percyliang @pbhatnagar3 please review","created_at":"2015-11-12T07:37:47Z","updated_at":"2015-11-12T07:41:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"512459b1d1338f89c86236d67ce9fb9cfb49f4a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/219/commits","review_comments_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/219/comments","review_comment_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/issues/219/comments","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/e9e1e85a0b6ddfa41bb738b77ee26350204739be","head":{"label":"kashizui:fix-cl1377","ref":"fix-cl1377","sha":"e9e1e85a0b6ddfa41bb738b77ee26350204739be","user":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"repo":{"id":42873179,"name":"codalab-cli","full_name":"kashizui/codalab-cli","owner":{"login":"kashizui","id":614837,"avatar_url":"https://avatars.githubusercontent.com/u/614837?v=3","gravatar_id":"","url":"https://api.github.com/users/kashizui","html_url":"https://github.com/kashizui","followers_url":"https://api.github.com/users/kashizui/followers","following_url":"https://api.github.com/users/kashizui/following{/other_user}","gists_url":"https://api.github.com/users/kashizui/gists{/gist_id}","starred_url":"https://api.github.com/users/kashizui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashizui/subscriptions","organizations_url":"https://api.github.com/users/kashizui/orgs","repos_url":"https://api.github.com/users/kashizui/repos","events_url":"https://api.github.com/users/kashizui/events{/privacy}","received_events_url":"https://api.github.com/users/kashizui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kashizui/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":true,"url":"https://api.github.com/repos/kashizui/codalab-cli","forks_url":"https://api.github.com/repos/kashizui/codalab-cli/forks","keys_url":"https://api.github.com/repos/kashizui/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kashizui/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kashizui/codalab-cli/teams","hooks_url":"https://api.github.com/repos/kashizui/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/kashizui/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/kashizui/codalab-cli/events","assignees_url":"https://api.github.com/repos/kashizui/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/kashizui/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/kashizui/codalab-cli/tags","blobs_url":"https://api.github.com/repos/kashizui/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kashizui/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kashizui/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/kashizui/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kashizui/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/kashizui/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/kashizui/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/kashizui/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/kashizui/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/kashizui/codalab-cli/subscription","commits_url":"https://api.github.com/repos/kashizui/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/kashizui/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/kashizui/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/kashizui/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/kashizui/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/kashizui/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kashizui/codalab-cli/merges","archive_url":"https://api.github.com/repos/kashizui/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kashizui/codalab-cli/downloads","issues_url":"https://api.github.com/repos/kashizui/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/kashizui/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/kashizui/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/kashizui/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kashizui/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/kashizui/codalab-cli/releases{/id}","created_at":"2015-09-21T14:55:54Z","updated_at":"2015-09-21T14:55:54Z","pushed_at":"2015-11-12T07:31:01Z","git_url":"git://github.com/kashizui/codalab-cli.git","ssh_url":"git@github.com:kashizui/codalab-cli.git","clone_url":"https://github.com/kashizui/codalab-cli.git","svn_url":"https://github.com/kashizui/codalab-cli","homepage":null,"size":1659,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codalab:develop","ref":"develop","sha":"6917b661d92f7c5b44e7beef78ad8ee39ad704c8","user":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"User","site_admin":false},"repo":{"id":27352490,"name":"codalab-cli","full_name":"codalab/codalab-cli","owner":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codalab/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":false,"url":"https://api.github.com/repos/codalab/codalab-cli","forks_url":"https://api.github.com/repos/codalab/codalab-cli/forks","keys_url":"https://api.github.com/repos/codalab/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codalab/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codalab/codalab-cli/teams","hooks_url":"https://api.github.com/repos/codalab/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/codalab/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/codalab/codalab-cli/events","assignees_url":"https://api.github.com/repos/codalab/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/codalab/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/codalab/codalab-cli/tags","blobs_url":"https://api.github.com/repos/codalab/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codalab/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codalab/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/codalab/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/codalab/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/codalab/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/codalab/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/codalab/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/codalab/codalab-cli/subscription","commits_url":"https://api.github.com/repos/codalab/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/codalab/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/codalab/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/codalab/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/codalab/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codalab/codalab-cli/merges","archive_url":"https://api.github.com/repos/codalab/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codalab/codalab-cli/downloads","issues_url":"https://api.github.com/repos/codalab/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/codalab/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/codalab/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/codalab/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codalab/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/codalab/codalab-cli/releases{/id}","created_at":"2014-11-30T22:33:18Z","updated_at":"2015-10-16T08:56:24Z","pushed_at":"2015-11-12T07:37:47Z","git_url":"git://github.com/codalab/codalab-cli.git","ssh_url":"git@github.com:codalab/codalab-cli.git","clone_url":"https://github.com/codalab/codalab-cli.git","svn_url":"https://github.com/codalab/codalab-cli","homepage":null,"size":3153,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":39,"forks":8,"open_issues":39,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/219"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/219"},"issue":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/219"},"comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/219/comments"},"review_comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/219/comments"},"review_comment":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/219/commits"},"statuses":{"href":"https://api.github.com/repos/codalab/codalab-cli/statuses/e9e1e85a0b6ddfa41bb738b77ee26350204739be"}}}}