{"action":"created","comment":{"url":"https://api.github.com/repos/divmain/GitSavvy/pulls/comments/53882337","id":53882337,"diff_hunk":"@@ -0,0 +1,60 @@\n+import re\n+import sublime\n+from sublime_plugin import TextCommand\n+\n+from ..git_command import GitCommand\n+from ...common import util\n+\n+\n+class GsRemoteAddCommand(TextCommand, GitCommand):\n+    \"\"\"\n+    Add remotes\n+    \"\"\"\n+\n+    def run(self, edit):\n+        # Get remote name from user\n+        self.view.window().show_input_panel(\"Remote URL\", \"\", self.on_select_remote, None, None)\n+\n+    def on_select_remote(self, input_url):\n+        self.url = input_url\n+        # URLs can come in one of following formats format\n+        # https://github.com/divmain/GitSavvy.git\n+        #     git@github.com:divmain/GitSavvy.git\n+        # Kind of funky, but does the job\n+        _split_url = re.split('/|:', input_url)\n+        owner = _split_url[-2] if len(_split_url) >= 2 else ''\n+\n+        self.view.window().show_input_panel(\"Remote name\", owner, self.on_select_name, None, None)","path":"core/commands/remote.py","position":27,"original_position":27,"commit_id":"ab1855f517f6d00514014d5136ec19abc02c60ec","original_commit_id":"ab1855f517f6d00514014d5136ec19abc02c60ec","user":{"login":"divmain","id":5016978,"avatar_url":"https://avatars.githubusercontent.com/u/5016978?v=3","gravatar_id":"","url":"https://api.github.com/users/divmain","html_url":"https://github.com/divmain","followers_url":"https://api.github.com/users/divmain/followers","following_url":"https://api.github.com/users/divmain/following{/other_user}","gists_url":"https://api.github.com/users/divmain/gists{/gist_id}","starred_url":"https://api.github.com/users/divmain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divmain/subscriptions","organizations_url":"https://api.github.com/users/divmain/orgs","repos_url":"https://api.github.com/users/divmain/repos","events_url":"https://api.github.com/users/divmain/events{/privacy}","received_events_url":"https://api.github.com/users/divmain/received_events","type":"User","site_admin":false},"body":"I like how you pre-populated this!","created_at":"2016-02-24T01:38:13Z","updated_at":"2016-02-24T01:38:13Z","html_url":"https://github.com/divmain/GitSavvy/pull/357#discussion_r53882337","pull_request_url":"https://api.github.com/repos/divmain/GitSavvy/pulls/357","_links":{"self":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/comments/53882337"},"html":{"href":"https://github.com/divmain/GitSavvy/pull/357#discussion_r53882337"},"pull_request":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/357"}}},"pull_request":{"url":"https://api.github.com/repos/divmain/GitSavvy/pulls/357","id":60414590,"html_url":"https://github.com/divmain/GitSavvy/pull/357","diff_url":"https://github.com/divmain/GitSavvy/pull/357.diff","patch_url":"https://github.com/divmain/GitSavvy/pull/357.patch","issue_url":"https://api.github.com/repos/divmain/GitSavvy/issues/357","number":357,"state":"open","locked":false,"title":"Manage remote","user":{"login":"stoivo","id":3492040,"avatar_url":"https://avatars.githubusercontent.com/u/3492040?v=3","gravatar_id":"","url":"https://api.github.com/users/stoivo","html_url":"https://github.com/stoivo","followers_url":"https://api.github.com/users/stoivo/followers","following_url":"https://api.github.com/users/stoivo/following{/other_user}","gists_url":"https://api.github.com/users/stoivo/gists{/gist_id}","starred_url":"https://api.github.com/users/stoivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoivo/subscriptions","organizations_url":"https://api.github.com/users/stoivo/orgs","repos_url":"https://api.github.com/users/stoivo/repos","events_url":"https://api.github.com/users/stoivo/events{/privacy}","received_events_url":"https://api.github.com/users/stoivo/received_events","type":"User","site_admin":false},"body":"Finish up and closes #347 \r\n\r\nNow we have `git: remote add` and `git: remote remove`\r\nThere exist rename, but it will have to wait.","created_at":"2016-02-23T21:40:51Z","updated_at":"2016-02-24T01:38:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a753b7d15495f760cad8c4e19eda47eb077278e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/divmain/GitSavvy/pulls/357/commits","review_comments_url":"https://api.github.com/repos/divmain/GitSavvy/pulls/357/comments","review_comment_url":"https://api.github.com/repos/divmain/GitSavvy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/divmain/GitSavvy/issues/357/comments","statuses_url":"https://api.github.com/repos/divmain/GitSavvy/statuses/ab1855f517f6d00514014d5136ec19abc02c60ec","head":{"label":"stoivo:manage_remote","ref":"manage_remote","sha":"ab1855f517f6d00514014d5136ec19abc02c60ec","user":{"login":"stoivo","id":3492040,"avatar_url":"https://avatars.githubusercontent.com/u/3492040?v=3","gravatar_id":"","url":"https://api.github.com/users/stoivo","html_url":"https://github.com/stoivo","followers_url":"https://api.github.com/users/stoivo/followers","following_url":"https://api.github.com/users/stoivo/following{/other_user}","gists_url":"https://api.github.com/users/stoivo/gists{/gist_id}","starred_url":"https://api.github.com/users/stoivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoivo/subscriptions","organizations_url":"https://api.github.com/users/stoivo/orgs","repos_url":"https://api.github.com/users/stoivo/repos","events_url":"https://api.github.com/users/stoivo/events{/privacy}","received_events_url":"https://api.github.com/users/stoivo/received_events","type":"User","site_admin":false},"repo":{"id":34816084,"name":"GitSavvy","full_name":"stoivo/GitSavvy","owner":{"login":"stoivo","id":3492040,"avatar_url":"https://avatars.githubusercontent.com/u/3492040?v=3","gravatar_id":"","url":"https://api.github.com/users/stoivo","html_url":"https://github.com/stoivo","followers_url":"https://api.github.com/users/stoivo/followers","following_url":"https://api.github.com/users/stoivo/following{/other_user}","gists_url":"https://api.github.com/users/stoivo/gists{/gist_id}","starred_url":"https://api.github.com/users/stoivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoivo/subscriptions","organizations_url":"https://api.github.com/users/stoivo/orgs","repos_url":"https://api.github.com/users/stoivo/repos","events_url":"https://api.github.com/users/stoivo/events{/privacy}","received_events_url":"https://api.github.com/users/stoivo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stoivo/GitSavvy","description":"Full git and GitHub integration with Sublime Text 3.","fork":true,"url":"https://api.github.com/repos/stoivo/GitSavvy","forks_url":"https://api.github.com/repos/stoivo/GitSavvy/forks","keys_url":"https://api.github.com/repos/stoivo/GitSavvy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stoivo/GitSavvy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stoivo/GitSavvy/teams","hooks_url":"https://api.github.com/repos/stoivo/GitSavvy/hooks","issue_events_url":"https://api.github.com/repos/stoivo/GitSavvy/issues/events{/number}","events_url":"https://api.github.com/repos/stoivo/GitSavvy/events","assignees_url":"https://api.github.com/repos/stoivo/GitSavvy/assignees{/user}","branches_url":"https://api.github.com/repos/stoivo/GitSavvy/branches{/branch}","tags_url":"https://api.github.com/repos/stoivo/GitSavvy/tags","blobs_url":"https://api.github.com/repos/stoivo/GitSavvy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stoivo/GitSavvy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stoivo/GitSavvy/git/refs{/sha}","trees_url":"https://api.github.com/repos/stoivo/GitSavvy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stoivo/GitSavvy/statuses/{sha}","languages_url":"https://api.github.com/repos/stoivo/GitSavvy/languages","stargazers_url":"https://api.github.com/repos/stoivo/GitSavvy/stargazers","contributors_url":"https://api.github.com/repos/stoivo/GitSavvy/contributors","subscribers_url":"https://api.github.com/repos/stoivo/GitSavvy/subscribers","subscription_url":"https://api.github.com/repos/stoivo/GitSavvy/subscription","commits_url":"https://api.github.com/repos/stoivo/GitSavvy/commits{/sha}","git_commits_url":"https://api.github.com/repos/stoivo/GitSavvy/git/commits{/sha}","comments_url":"https://api.github.com/repos/stoivo/GitSavvy/comments{/number}","issue_comment_url":"https://api.github.com/repos/stoivo/GitSavvy/issues/comments{/number}","contents_url":"https://api.github.com/repos/stoivo/GitSavvy/contents/{+path}","compare_url":"https://api.github.com/repos/stoivo/GitSavvy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stoivo/GitSavvy/merges","archive_url":"https://api.github.com/repos/stoivo/GitSavvy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stoivo/GitSavvy/downloads","issues_url":"https://api.github.com/repos/stoivo/GitSavvy/issues{/number}","pulls_url":"https://api.github.com/repos/stoivo/GitSavvy/pulls{/number}","milestones_url":"https://api.github.com/repos/stoivo/GitSavvy/milestones{/number}","notifications_url":"https://api.github.com/repos/stoivo/GitSavvy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stoivo/GitSavvy/labels{/name}","releases_url":"https://api.github.com/repos/stoivo/GitSavvy/releases{/id}","deployments_url":"https://api.github.com/repos/stoivo/GitSavvy/deployments","created_at":"2015-04-29T20:15:36Z","updated_at":"2016-02-12T23:37:32Z","pushed_at":"2016-02-23T21:37:02Z","git_url":"git://github.com/stoivo/GitSavvy.git","ssh_url":"git@github.com:stoivo/GitSavvy.git","clone_url":"https://github.com/stoivo/GitSavvy.git","svn_url":"https://github.com/stoivo/GitSavvy","homepage":"","size":762,"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":"divmain:master","ref":"master","sha":"a6376771b6b6c1e925afff3d17b9563f1fb23a82","user":{"login":"divmain","id":5016978,"avatar_url":"https://avatars.githubusercontent.com/u/5016978?v=3","gravatar_id":"","url":"https://api.github.com/users/divmain","html_url":"https://github.com/divmain","followers_url":"https://api.github.com/users/divmain/followers","following_url":"https://api.github.com/users/divmain/following{/other_user}","gists_url":"https://api.github.com/users/divmain/gists{/gist_id}","starred_url":"https://api.github.com/users/divmain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divmain/subscriptions","organizations_url":"https://api.github.com/users/divmain/orgs","repos_url":"https://api.github.com/users/divmain/repos","events_url":"https://api.github.com/users/divmain/events{/privacy}","received_events_url":"https://api.github.com/users/divmain/received_events","type":"User","site_admin":false},"repo":{"id":29417074,"name":"GitSavvy","full_name":"divmain/GitSavvy","owner":{"login":"divmain","id":5016978,"avatar_url":"https://avatars.githubusercontent.com/u/5016978?v=3","gravatar_id":"","url":"https://api.github.com/users/divmain","html_url":"https://github.com/divmain","followers_url":"https://api.github.com/users/divmain/followers","following_url":"https://api.github.com/users/divmain/following{/other_user}","gists_url":"https://api.github.com/users/divmain/gists{/gist_id}","starred_url":"https://api.github.com/users/divmain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divmain/subscriptions","organizations_url":"https://api.github.com/users/divmain/orgs","repos_url":"https://api.github.com/users/divmain/repos","events_url":"https://api.github.com/users/divmain/events{/privacy}","received_events_url":"https://api.github.com/users/divmain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/divmain/GitSavvy","description":"Full git and GitHub integration with Sublime Text 3.","fork":false,"url":"https://api.github.com/repos/divmain/GitSavvy","forks_url":"https://api.github.com/repos/divmain/GitSavvy/forks","keys_url":"https://api.github.com/repos/divmain/GitSavvy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divmain/GitSavvy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divmain/GitSavvy/teams","hooks_url":"https://api.github.com/repos/divmain/GitSavvy/hooks","issue_events_url":"https://api.github.com/repos/divmain/GitSavvy/issues/events{/number}","events_url":"https://api.github.com/repos/divmain/GitSavvy/events","assignees_url":"https://api.github.com/repos/divmain/GitSavvy/assignees{/user}","branches_url":"https://api.github.com/repos/divmain/GitSavvy/branches{/branch}","tags_url":"https://api.github.com/repos/divmain/GitSavvy/tags","blobs_url":"https://api.github.com/repos/divmain/GitSavvy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divmain/GitSavvy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divmain/GitSavvy/git/refs{/sha}","trees_url":"https://api.github.com/repos/divmain/GitSavvy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divmain/GitSavvy/statuses/{sha}","languages_url":"https://api.github.com/repos/divmain/GitSavvy/languages","stargazers_url":"https://api.github.com/repos/divmain/GitSavvy/stargazers","contributors_url":"https://api.github.com/repos/divmain/GitSavvy/contributors","subscribers_url":"https://api.github.com/repos/divmain/GitSavvy/subscribers","subscription_url":"https://api.github.com/repos/divmain/GitSavvy/subscription","commits_url":"https://api.github.com/repos/divmain/GitSavvy/commits{/sha}","git_commits_url":"https://api.github.com/repos/divmain/GitSavvy/git/commits{/sha}","comments_url":"https://api.github.com/repos/divmain/GitSavvy/comments{/number}","issue_comment_url":"https://api.github.com/repos/divmain/GitSavvy/issues/comments{/number}","contents_url":"https://api.github.com/repos/divmain/GitSavvy/contents/{+path}","compare_url":"https://api.github.com/repos/divmain/GitSavvy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divmain/GitSavvy/merges","archive_url":"https://api.github.com/repos/divmain/GitSavvy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divmain/GitSavvy/downloads","issues_url":"https://api.github.com/repos/divmain/GitSavvy/issues{/number}","pulls_url":"https://api.github.com/repos/divmain/GitSavvy/pulls{/number}","milestones_url":"https://api.github.com/repos/divmain/GitSavvy/milestones{/number}","notifications_url":"https://api.github.com/repos/divmain/GitSavvy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divmain/GitSavvy/labels{/name}","releases_url":"https://api.github.com/repos/divmain/GitSavvy/releases{/id}","deployments_url":"https://api.github.com/repos/divmain/GitSavvy/deployments","created_at":"2015-01-18T05:40:08Z","updated_at":"2016-02-19T20:59:31Z","pushed_at":"2016-02-23T21:40:51Z","git_url":"git://github.com/divmain/GitSavvy.git","ssh_url":"git@github.com:divmain/GitSavvy.git","clone_url":"https://github.com/divmain/GitSavvy.git","svn_url":"https://github.com/divmain/GitSavvy","homepage":"","size":821,"stargazers_count":1281,"watchers_count":1281,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":50,"forks":71,"open_issues":50,"watchers":1281,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/357"},"html":{"href":"https://github.com/divmain/GitSavvy/pull/357"},"issue":{"href":"https://api.github.com/repos/divmain/GitSavvy/issues/357"},"comments":{"href":"https://api.github.com/repos/divmain/GitSavvy/issues/357/comments"},"review_comments":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/357/comments"},"review_comment":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/divmain/GitSavvy/pulls/357/commits"},"statuses":{"href":"https://api.github.com/repos/divmain/GitSavvy/statuses/ab1855f517f6d00514014d5136ec19abc02c60ec"}}}}