{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/comments/27813859","id":27813859,"diff_hunk":"@@ -0,0 +1,122 @@\n+# Copyright 2013-2014 Red Hat, Inc.\n+#\n+# This software is licensed to you under the GNU General Public\n+# License as published by the Free Software Foundation; either version\n+# 2 of the License (GPLv2) or (at your option) any later version.\n+# There is NO WARRANTY for this software, express or implied,\n+# including the implied warranties of MERCHANTABILITY,\n+# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should\n+# have received a copy of GPLv2 along with this software; if not, see\n+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.\n+\n+\n+module HammerCLICsv\n+  class CsvCommand\n+    class SyncPlansCommand < BaseCommand\n+      command_name 'sync-plans'\n+      desc         'import or export repository sync plans'\n+\n+      option %w(--organization), 'ORGANIZATION', 'Only process organization matching this name'","path":"lib/hammer_cli_csv/sync_plans.rb","position":19,"original_position":19,"commit_id":"b6d0223146f71bd51b4db9311e387b9c9fafe7fd","original_commit_id":"b6d0223146f71bd51b4db9311e387b9c9fafe7fd","user":{"login":"komidore64","id":1020555,"avatar_url":"https://avatars.githubusercontent.com/u/1020555?v=3","gravatar_id":"","url":"https://api.github.com/users/komidore64","html_url":"https://github.com/komidore64","followers_url":"https://api.github.com/users/komidore64/followers","following_url":"https://api.github.com/users/komidore64/following{/other_user}","gists_url":"https://api.github.com/users/komidore64/gists{/gist_id}","starred_url":"https://api.github.com/users/komidore64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komidore64/subscriptions","organizations_url":"https://api.github.com/users/komidore64/orgs","repos_url":"https://api.github.com/users/komidore64/repos","events_url":"https://api.github.com/users/komidore64/events{/privacy}","received_events_url":"https://api.github.com/users/komidore64/received_events","type":"User","site_admin":false},"body":"i'm seeing this all over the place. would you be able to create a base csv command that contains all the similar code?","created_at":"2015-04-06T17:43:55Z","updated_at":"2015-04-06T17:43:55Z","html_url":"https://github.com/Katello/hammer-cli-csv/pull/78#discussion_r27813859","pull_request_url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/comments/27813859"},"html":{"href":"https://github.com/Katello/hammer-cli-csv/pull/78#discussion_r27813859"},"pull_request":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78","id":32349617,"html_url":"https://github.com/Katello/hammer-cli-csv/pull/78","diff_url":"https://github.com/Katello/hammer-cli-csv/pull/78.diff","patch_url":"https://github.com/Katello/hammer-cli-csv/pull/78.patch","issue_url":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/78","number":78,"state":"open","locked":false,"title":"usability and fixes","user":{"login":"thomasmckay","id":338096,"avatar_url":"https://avatars.githubusercontent.com/u/338096?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmckay","html_url":"https://github.com/thomasmckay","followers_url":"https://api.github.com/users/thomasmckay/followers","following_url":"https://api.github.com/users/thomasmckay/following{/other_user}","gists_url":"https://api.github.com/users/thomasmckay/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmckay/subscriptions","organizations_url":"https://api.github.com/users/thomasmckay/orgs","repos_url":"https://api.github.com/users/thomasmckay/repos","events_url":"https://api.github.com/users/thomasmckay/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmckay/received_events","type":"User","site_admin":false},"body":"+ import/export sync plans\r\n+ added --organization to some resources\r\n+ export and import red hat products in addition to custom ones to allow them to be sync'ed\r\n+ import updated to include products and subscriptions properly\r\n+ fixed products cli args\r\n+ updated user admin flag","created_at":"2015-03-31T18:12:10Z","updated_at":"2015-04-06T17:43:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c8f9ca3ca5aa55f5b33f6d7e67d7281ce3d7b14","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78/commits","review_comments_url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78/comments","review_comment_url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/78/comments","statuses_url":"https://api.github.com/repos/Katello/hammer-cli-csv/statuses/b6d0223146f71bd51b4db9311e387b9c9fafe7fd","head":{"label":"thomasmckay:sync-plans","ref":"sync-plans","sha":"b6d0223146f71bd51b4db9311e387b9c9fafe7fd","user":{"login":"thomasmckay","id":338096,"avatar_url":"https://avatars.githubusercontent.com/u/338096?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmckay","html_url":"https://github.com/thomasmckay","followers_url":"https://api.github.com/users/thomasmckay/followers","following_url":"https://api.github.com/users/thomasmckay/following{/other_user}","gists_url":"https://api.github.com/users/thomasmckay/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmckay/subscriptions","organizations_url":"https://api.github.com/users/thomasmckay/orgs","repos_url":"https://api.github.com/users/thomasmckay/repos","events_url":"https://api.github.com/users/thomasmckay/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmckay/received_events","type":"User","site_admin":false},"repo":{"id":17438548,"name":"hammer-cli-csv","full_name":"thomasmckay/hammer-cli-csv","owner":{"login":"thomasmckay","id":338096,"avatar_url":"https://avatars.githubusercontent.com/u/338096?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmckay","html_url":"https://github.com/thomasmckay","followers_url":"https://api.github.com/users/thomasmckay/followers","following_url":"https://api.github.com/users/thomasmckay/following{/other_user}","gists_url":"https://api.github.com/users/thomasmckay/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmckay/subscriptions","organizations_url":"https://api.github.com/users/thomasmckay/orgs","repos_url":"https://api.github.com/users/thomasmckay/repos","events_url":"https://api.github.com/users/thomasmckay/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmckay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasmckay/hammer-cli-csv","description":"","fork":true,"url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv","forks_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/forks","keys_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/teams","hooks_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/hooks","issue_events_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/issues/events{/number}","events_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/events","assignees_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/assignees{/user}","branches_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/branches{/branch}","tags_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/tags","blobs_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/languages","stargazers_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/stargazers","contributors_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/contributors","subscribers_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/subscribers","subscription_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/subscription","commits_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/contents/{+path}","compare_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/merges","archive_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/downloads","issues_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/issues{/number}","pulls_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/labels{/name}","releases_url":"https://api.github.com/repos/thomasmckay/hammer-cli-csv/releases{/id}","created_at":"2014-03-05T11:22:07Z","updated_at":"2015-03-16T21:59:49Z","pushed_at":"2015-04-06T14:03:06Z","git_url":"git://github.com/thomasmckay/hammer-cli-csv.git","ssh_url":"git@github.com:thomasmckay/hammer-cli-csv.git","clone_url":"https://github.com/thomasmckay/hammer-cli-csv.git","svn_url":"https://github.com/thomasmckay/hammer-cli-csv","homepage":null,"size":910,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"18b2a6aeb71a8cee551f8986fbb469b0d6b6ca47","user":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":14110969,"name":"hammer-cli-csv","full_name":"Katello/hammer-cli-csv","owner":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/hammer-cli-csv","description":"Foretello data convenience utility: Import and export CSV data","fork":false,"url":"https://api.github.com/repos/Katello/hammer-cli-csv","forks_url":"https://api.github.com/repos/Katello/hammer-cli-csv/forks","keys_url":"https://api.github.com/repos/Katello/hammer-cli-csv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/hammer-cli-csv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/hammer-cli-csv/teams","hooks_url":"https://api.github.com/repos/Katello/hammer-cli-csv/hooks","issue_events_url":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/hammer-cli-csv/events","assignees_url":"https://api.github.com/repos/Katello/hammer-cli-csv/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/hammer-cli-csv/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/hammer-cli-csv/tags","blobs_url":"https://api.github.com/repos/Katello/hammer-cli-csv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/hammer-cli-csv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/hammer-cli-csv/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/hammer-cli-csv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/hammer-cli-csv/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/hammer-cli-csv/languages","stargazers_url":"https://api.github.com/repos/Katello/hammer-cli-csv/stargazers","contributors_url":"https://api.github.com/repos/Katello/hammer-cli-csv/contributors","subscribers_url":"https://api.github.com/repos/Katello/hammer-cli-csv/subscribers","subscription_url":"https://api.github.com/repos/Katello/hammer-cli-csv/subscription","commits_url":"https://api.github.com/repos/Katello/hammer-cli-csv/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/hammer-cli-csv/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/hammer-cli-csv/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/hammer-cli-csv/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/hammer-cli-csv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/hammer-cli-csv/merges","archive_url":"https://api.github.com/repos/Katello/hammer-cli-csv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/hammer-cli-csv/downloads","issues_url":"https://api.github.com/repos/Katello/hammer-cli-csv/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/hammer-cli-csv/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/hammer-cli-csv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/hammer-cli-csv/labels{/name}","releases_url":"https://api.github.com/repos/Katello/hammer-cli-csv/releases{/id}","created_at":"2013-11-04T13:55:06Z","updated_at":"2015-03-20T08:30:52Z","pushed_at":"2015-04-06T14:03:06Z","git_url":"git://github.com/Katello/hammer-cli-csv.git","ssh_url":"git@github.com:Katello/hammer-cli-csv.git","clone_url":"https://github.com/Katello/hammer-cli-csv.git","svn_url":"https://github.com/Katello/hammer-cli-csv","homepage":"","size":1136,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78"},"html":{"href":"https://github.com/Katello/hammer-cli-csv/pull/78"},"issue":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/78"},"comments":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/hammer-cli-csv/statuses/b6d0223146f71bd51b4db9311e387b9c9fafe7fd"}}}}