{"action":"created","comment":{"url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/comments/102062983","pull_request_review_id":22808062,"id":102062983,"diff_hunk":"@@ -0,0 +1,215 @@\n+#!/usr/bin/env ruby\n+\n+require '3scale_toolbox/cli'\n+require 'optparse'\n+\n+options = {}\n+\n+parser = OptionParser.new do |parser|\n+  parser.banner = '3scale update <command> [options]'\n+\n+  parser.on('-s', '--source SOURCE', \"Source\") do |domain|\n+    options[:source] = domain\n+  end\n+\n+  parser.on('-d', '--destination DESTINATION', \"Destination\") do |domain|\n+    options[:destination] = domain\n+  end\n+\n+  parser.on('-t', '--target-system-name TARGET_SYSTEM_NAME', 'Target system name') do |name|\n+    options[:target_system_name] = name\n+  end\n+\n+  parser.on('-h', '--help', 'Prints this help') do\n+    puts parser\n+    puts\n+    puts 'Available Commands:', ['service <service_id>', 'help']\n+    exit\n+  end\n+end\n+\n+print_help = ->(error = nil) do\n+  if error\n+    puts \"Error: #{error}\"\n+    puts\n+  end\n+  parser.parse(['--help'])\n+end\n+\n+\n+parser.parse!\n+\n+def compare_hashes(first, second, keys)\n+  keys.map{ |key| first.fetch(key) } == keys.map{ |key| second.fetch(key) }\n+end\n+\n+def fetch_option(options, key)\n+  options.fetch(key) { raise OptionParser::MissingArgument, key }\n+end\n+\n+def provider_key_from_url(url)\n+  url[/\\w*@/][0..-2]","path":"exe/3scale-update","position":51,"original_position":51,"commit_id":"6f5612f3bd1f3208881e6e99d630e88982d9deff","original_commit_id":"6f5612f3bd1f3208881e6e99d630e88982d9deff","user":{"login":"mpguerra","id":1311133,"avatar_url":"https://avatars.githubusercontent.com/u/1311133?v=3","gravatar_id":"","url":"https://api.github.com/users/mpguerra","html_url":"https://github.com/mpguerra","followers_url":"https://api.github.com/users/mpguerra/followers","following_url":"https://api.github.com/users/mpguerra/following{/other_user}","gists_url":"https://api.github.com/users/mpguerra/gists{/gist_id}","starred_url":"https://api.github.com/users/mpguerra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpguerra/subscriptions","organizations_url":"https://api.github.com/users/mpguerra/orgs","repos_url":"https://api.github.com/users/mpguerra/repos","events_url":"https://api.github.com/users/mpguerra/events{/privacy}","received_events_url":"https://api.github.com/users/mpguerra/received_events","type":"User","site_admin":false},"body":"nope, was not aware that one was different :)","created_at":"2017-02-20T17:19:17Z","updated_at":"2017-02-20T17:19:17Z","html_url":"https://github.com/3scale/3scale_toolbox/pull/28#discussion_r102062983","pull_request_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/comments/102062983"},"html":{"href":"https://github.com/3scale/3scale_toolbox/pull/28#discussion_r102062983"},"pull_request":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28","id":107038249,"html_url":"https://github.com/3scale/3scale_toolbox/pull/28","diff_url":"https://github.com/3scale/3scale_toolbox/pull/28.diff","patch_url":"https://github.com/3scale/3scale_toolbox/pull/28.patch","issue_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/28","number":28,"state":"open","locked":false,"title":"Overwrite service","user":{"login":"mpguerra","id":1311133,"avatar_url":"https://avatars.githubusercontent.com/u/1311133?v=3","gravatar_id":"","url":"https://api.github.com/users/mpguerra","html_url":"https://github.com/mpguerra","followers_url":"https://api.github.com/users/mpguerra/followers","following_url":"https://api.github.com/users/mpguerra/following{/other_user}","gists_url":"https://api.github.com/users/mpguerra/gists{/gist_id}","starred_url":"https://api.github.com/users/mpguerra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpguerra/subscriptions","organizations_url":"https://api.github.com/users/mpguerra/orgs","repos_url":"https://api.github.com/users/mpguerra/repos","events_url":"https://api.github.com/users/mpguerra/events{/privacy}","received_events_url":"https://api.github.com/users/mpguerra/received_events","type":"User","site_admin":false},"body":"Adds a new command 3scale update to copy changes from one existing service to another","created_at":"2017-02-20T16:23:34Z","updated_at":"2017-02-20T17:19:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"221ea674f4c78e69c3aa677454acfc54fde9a0d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28/commits","review_comments_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28/comments","review_comment_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/28/comments","statuses_url":"https://api.github.com/repos/3scale/3scale_toolbox/statuses/6f5612f3bd1f3208881e6e99d630e88982d9deff","head":{"label":"3scale:overwrite-service","ref":"overwrite-service","sha":"6f5612f3bd1f3208881e6e99d630e88982d9deff","user":{"login":"3scale","id":21415,"avatar_url":"https://avatars.githubusercontent.com/u/21415?v=3","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"repo":{"id":53669727,"name":"3scale_toolbox","full_name":"3scale/3scale_toolbox","owner":{"login":"3scale","id":21415,"avatar_url":"https://avatars.githubusercontent.com/u/21415?v=3","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/3scale/3scale_toolbox","description":"3scale CLI toolbox","fork":false,"url":"https://api.github.com/repos/3scale/3scale_toolbox","forks_url":"https://api.github.com/repos/3scale/3scale_toolbox/forks","keys_url":"https://api.github.com/repos/3scale/3scale_toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3scale/3scale_toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3scale/3scale_toolbox/teams","hooks_url":"https://api.github.com/repos/3scale/3scale_toolbox/hooks","issue_events_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/3scale/3scale_toolbox/events","assignees_url":"https://api.github.com/repos/3scale/3scale_toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/3scale/3scale_toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/3scale/3scale_toolbox/tags","blobs_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3scale/3scale_toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/3scale/3scale_toolbox/languages","stargazers_url":"https://api.github.com/repos/3scale/3scale_toolbox/stargazers","contributors_url":"https://api.github.com/repos/3scale/3scale_toolbox/contributors","subscribers_url":"https://api.github.com/repos/3scale/3scale_toolbox/subscribers","subscription_url":"https://api.github.com/repos/3scale/3scale_toolbox/subscription","commits_url":"https://api.github.com/repos/3scale/3scale_toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/3scale/3scale_toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/3scale/3scale_toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/3scale/3scale_toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3scale/3scale_toolbox/merges","archive_url":"https://api.github.com/repos/3scale/3scale_toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3scale/3scale_toolbox/downloads","issues_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/3scale/3scale_toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/3scale/3scale_toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3scale/3scale_toolbox/labels{/name}","releases_url":"https://api.github.com/repos/3scale/3scale_toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/3scale/3scale_toolbox/deployments","created_at":"2016-03-11T13:42:25Z","updated_at":"2016-11-16T14:33:10Z","pushed_at":"2017-02-20T16:23:35Z","git_url":"git://github.com/3scale/3scale_toolbox.git","ssh_url":"git@github.com:3scale/3scale_toolbox.git","clone_url":"https://github.com/3scale/3scale_toolbox.git","svn_url":"https://github.com/3scale/3scale_toolbox","homepage":null,"size":48,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"3scale:master","ref":"master","sha":"495c24d6fc0b54379a1ae6461c478a80f42d652d","user":{"login":"3scale","id":21415,"avatar_url":"https://avatars.githubusercontent.com/u/21415?v=3","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"repo":{"id":53669727,"name":"3scale_toolbox","full_name":"3scale/3scale_toolbox","owner":{"login":"3scale","id":21415,"avatar_url":"https://avatars.githubusercontent.com/u/21415?v=3","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/3scale/3scale_toolbox","description":"3scale CLI toolbox","fork":false,"url":"https://api.github.com/repos/3scale/3scale_toolbox","forks_url":"https://api.github.com/repos/3scale/3scale_toolbox/forks","keys_url":"https://api.github.com/repos/3scale/3scale_toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3scale/3scale_toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3scale/3scale_toolbox/teams","hooks_url":"https://api.github.com/repos/3scale/3scale_toolbox/hooks","issue_events_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/3scale/3scale_toolbox/events","assignees_url":"https://api.github.com/repos/3scale/3scale_toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/3scale/3scale_toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/3scale/3scale_toolbox/tags","blobs_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3scale/3scale_toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/3scale/3scale_toolbox/languages","stargazers_url":"https://api.github.com/repos/3scale/3scale_toolbox/stargazers","contributors_url":"https://api.github.com/repos/3scale/3scale_toolbox/contributors","subscribers_url":"https://api.github.com/repos/3scale/3scale_toolbox/subscribers","subscription_url":"https://api.github.com/repos/3scale/3scale_toolbox/subscription","commits_url":"https://api.github.com/repos/3scale/3scale_toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/3scale/3scale_toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/3scale/3scale_toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/3scale/3scale_toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/3scale/3scale_toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3scale/3scale_toolbox/merges","archive_url":"https://api.github.com/repos/3scale/3scale_toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3scale/3scale_toolbox/downloads","issues_url":"https://api.github.com/repos/3scale/3scale_toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/3scale/3scale_toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/3scale/3scale_toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/3scale/3scale_toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3scale/3scale_toolbox/labels{/name}","releases_url":"https://api.github.com/repos/3scale/3scale_toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/3scale/3scale_toolbox/deployments","created_at":"2016-03-11T13:42:25Z","updated_at":"2016-11-16T14:33:10Z","pushed_at":"2017-02-20T16:23:35Z","git_url":"git://github.com/3scale/3scale_toolbox.git","ssh_url":"git@github.com:3scale/3scale_toolbox.git","clone_url":"https://github.com/3scale/3scale_toolbox.git","svn_url":"https://github.com/3scale/3scale_toolbox","homepage":null,"size":48,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28"},"html":{"href":"https://github.com/3scale/3scale_toolbox/pull/28"},"issue":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/issues/28"},"comments":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/3scale/3scale_toolbox/statuses/6f5612f3bd1f3208881e6e99d630e88982d9deff"}}}}
{"actor":{"display_login":"mpguerra"}}