{"action":"created","comment":{"url":"https://api.github.com/repos/plone/plonecli/pulls/comments/196027304","pull_request_review_id":129500602,"id":196027304,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjAyNzMwNA==","diff_hunk":"@@ -0,0 +1,120 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"Configure mrbob.\"\"\"\n+\n+from mrbob.bobexceptions import SkipQuestion\n+\n+import os\n+\n+\n+try:\n+    from ConfigParser import ConfigParser\n+except ImportError:\n+    from configparser import ConfigParser\n+\n+\n+home = os.path.expanduser('~')\n+\n+\n+def generate_answers_ini(path, template):\n+    with open(os.path.join(path, '.mrbob'), 'w') as f:\n+        f.write(template)\n+\n+\n+def check_git_init(configurator, answer):\n+    if configurator.variables['configure_mrbob.package.git.init']:\n+        raise SkipQuestion(\n+            u'GIT is not initialize, so we skip autocommit question.',\n+        )\n+\n+\n+def check_mrbob_config(value):\n+    config = ConfigParser()\n+    path = home + '/.mrbob'\n+    config.read(path)\n+    if not config.sections():\n+        return\n+    return config.get('variables', value)\n+\n+\n+def pre_username(configurator, question):\n+    \"\"\"Get username from mrbob config file.\"\"\"\n+    default = check_mrbob_config('author.name')\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_email(configurator, question):\n+    \"\"\"Get author email from mrbob config file.\"\"\"\n+    default = check_mrbob_config('author.email')\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_github_username(configurator, question):\n+    \"\"\"Get Github username from mrbob config file.\"\"\"\n+    default = check_mrbob_config('author.github.user')\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_plone_version(configurator, question):\n+    \"\"\"Get plone version from mrbob config file.\"\"\"\n+    default = check_mrbob_config('plone.version')\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_package_git_init(configurator, question):\n+    \"\"\"Get git init setting from mrbob config file.\"\"\"\n+    default = check_mrbob_config('package.git.init')\n+    if default == 'True':\n+        default = 'y'\n+    elif default == 'False':\n+        default = 'n'\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_package_git_autocommit(configurator, question):\n+    \"\"\"Get git autocommit setting from mrbob config file.\"\"\"\n+    default = check_mrbob_config('package.git.autocommit')\n+    if default == 'True':\n+        default = 'y'\n+    elif default == 'False':\n+        default = 'n'\n+    if default and question:\n+        question.default = default\n+\n+\n+def pre_package_git_disable(configurator, question):\n+    \"\"\"Get git setting from mrbob config file.\"\"\"\n+    default = check_mrbob_config('package.git.disabled')\n+    if default == 'True':","path":"plonecli/configure_mrbob.py","position":92,"original_position":92,"commit_id":"fbd3ee1492876b34fc506b6c6e5ec0f565ea3b09","original_commit_id":"fbd3ee1492876b34fc506b6c6e5ec0f565ea3b09","user":{"login":"MrTango","id":1113628,"node_id":"MDQ6VXNlcjExMTM2Mjg=","avatar_url":"https://avatars1.githubusercontent.com/u/1113628?v=4","gravatar_id":"","url":"https://api.github.com/users/MrTango","html_url":"https://github.com/MrTango","followers_url":"https://api.github.com/users/MrTango/followers","following_url":"https://api.github.com/users/MrTango/following{/other_user}","gists_url":"https://api.github.com/users/MrTango/gists{/gist_id}","starred_url":"https://api.github.com/users/MrTango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrTango/subscriptions","organizations_url":"https://api.github.com/users/MrTango/orgs","repos_url":"https://api.github.com/users/MrTango/repos","events_url":"https://api.github.com/users/MrTango/events{/privacy}","received_events_url":"https://api.github.com/users/MrTango/received_events","type":"User","site_admin":false},"body":"why you are doing this transforms?","created_at":"2018-06-18T10:12:09Z","updated_at":"2018-06-18T10:18:59Z","html_url":"https://github.com/plone/plonecli/pull/26#discussion_r196027304","pull_request_url":"https://api.github.com/repos/plone/plonecli/pulls/26","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/plone/plonecli/pulls/comments/196027304"},"html":{"href":"https://github.com/plone/plonecli/pull/26#discussion_r196027304"},"pull_request":{"href":"https://api.github.com/repos/plone/plonecli/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/plone/plonecli/pulls/26","id":194411018,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NDExMDE4","html_url":"https://github.com/plone/plonecli/pull/26","diff_url":"https://github.com/plone/plonecli/pull/26.diff","patch_url":"https://github.com/plone/plonecli/pull/26.patch","issue_url":"https://api.github.com/repos/plone/plonecli/issues/26","number":26,"state":"open","locked":false,"title":"Add config command","user":{"login":"kakshay21","id":13598994,"node_id":"MDQ6VXNlcjEzNTk4OTk0","avatar_url":"https://avatars3.githubusercontent.com/u/13598994?v=4","gravatar_id":"","url":"https://api.github.com/users/kakshay21","html_url":"https://github.com/kakshay21","followers_url":"https://api.github.com/users/kakshay21/followers","following_url":"https://api.github.com/users/kakshay21/following{/other_user}","gists_url":"https://api.github.com/users/kakshay21/gists{/gist_id}","starred_url":"https://api.github.com/users/kakshay21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kakshay21/subscriptions","organizations_url":"https://api.github.com/users/kakshay21/orgs","repos_url":"https://api.github.com/users/kakshay21/repos","events_url":"https://api.github.com/users/kakshay21/events{/privacy}","received_events_url":"https://api.github.com/users/kakshay21/received_events","type":"User","site_admin":false},"body":"see #22 ","created_at":"2018-06-12T21:19:51Z","updated_at":"2018-06-18T10:18:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abd13a749596f766aaa1d45a3cb244a07b0ded4d","assignee":{"login":"kakshay21","id":13598994,"node_id":"MDQ6VXNlcjEzNTk4OTk0","avatar_url":"https://avatars3.githubusercontent.com/u/13598994?v=4","gravatar_id":"","url":"https://api.github.com/users/kakshay21","html_url":"https://github.com/kakshay21","followers_url":"https://api.github.com/users/kakshay21/followers","following_url":"https://api.github.com/users/kakshay21/following{/other_user}","gists_url":"https://api.github.com/users/kakshay21/gists{/gist_id}","starred_url":"https://api.github.com/users/kakshay21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kakshay21/subscriptions","organizations_url":"https://api.github.com/users/kakshay21/orgs","repos_url":"https://api.github.com/users/kakshay21/repos","events_url":"https://api.github.com/users/kakshay21/events{/privacy}","received_events_url":"https://api.github.com/users/kakshay21/received_events","type":"User","site_admin":false},"assignees":[{"login":"kakshay21","id":13598994,"node_id":"MDQ6VXNlcjEzNTk4OTk0","avatar_url":"https://avatars3.githubusercontent.com/u/13598994?v=4","gravatar_id":"","url":"https://api.github.com/users/kakshay21","html_url":"https://github.com/kakshay21","followers_url":"https://api.github.com/users/kakshay21/followers","following_url":"https://api.github.com/users/kakshay21/following{/other_user}","gists_url":"https://api.github.com/users/kakshay21/gists{/gist_id}","starred_url":"https://api.github.com/users/kakshay21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kakshay21/subscriptions","organizations_url":"https://api.github.com/users/kakshay21/orgs","repos_url":"https://api.github.com/users/kakshay21/repos","events_url":"https://api.github.com/users/kakshay21/events{/privacy}","received_events_url":"https://api.github.com/users/kakshay21/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/plone/plonecli/pulls/26/commits","review_comments_url":"https://api.github.com/repos/plone/plonecli/pulls/26/comments","review_comment_url":"https://api.github.com/repos/plone/plonecli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plone/plonecli/issues/26/comments","statuses_url":"https://api.github.com/repos/plone/plonecli/statuses/fbd3ee1492876b34fc506b6c6e5ec0f565ea3b09","head":{"label":"plone:akshay-add-config","ref":"akshay-add-config","sha":"fbd3ee1492876b34fc506b6c6e5ec0f565ea3b09","user":{"login":"plone","id":72034,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDM0","avatar_url":"https://avatars0.githubusercontent.com/u/72034?v=4","gravatar_id":"","url":"https://api.github.com/users/plone","html_url":"https://github.com/plone","followers_url":"https://api.github.com/users/plone/followers","following_url":"https://api.github.com/users/plone/following{/other_user}","gists_url":"https://api.github.com/users/plone/gists{/gist_id}","starred_url":"https://api.github.com/users/plone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plone/subscriptions","organizations_url":"https://api.github.com/users/plone/orgs","repos_url":"https://api.github.com/users/plone/repos","events_url":"https://api.github.com/users/plone/events{/privacy}","received_events_url":"https://api.github.com/users/plone/received_events","type":"Organization","site_admin":false},"repo":{"id":107764003,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc3NjQwMDM=","name":"plonecli","full_name":"plone/plonecli","owner":{"login":"plone","id":72034,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDM0","avatar_url":"https://avatars0.githubusercontent.com/u/72034?v=4","gravatar_id":"","url":"https://api.github.com/users/plone","html_url":"https://github.com/plone","followers_url":"https://api.github.com/users/plone/followers","following_url":"https://api.github.com/users/plone/following{/other_user}","gists_url":"https://api.github.com/users/plone/gists{/gist_id}","starred_url":"https://api.github.com/users/plone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plone/subscriptions","organizations_url":"https://api.github.com/users/plone/orgs","repos_url":"https://api.github.com/users/plone/repos","events_url":"https://api.github.com/users/plone/events{/privacy}","received_events_url":"https://api.github.com/users/plone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plone/plonecli","description":"A Plone command line client for mrbob","fork":false,"url":"https://api.github.com/repos/plone/plonecli","forks_url":"https://api.github.com/repos/plone/plonecli/forks","keys_url":"https://api.github.com/repos/plone/plonecli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plone/plonecli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plone/plonecli/teams","hooks_url":"https://api.github.com/repos/plone/plonecli/hooks","issue_events_url":"https://api.github.com/repos/plone/plonecli/issues/events{/number}","events_url":"https://api.github.com/repos/plone/plonecli/events","assignees_url":"https://api.github.com/repos/plone/plonecli/assignees{/user}","branches_url":"https://api.github.com/repos/plone/plonecli/branches{/branch}","tags_url":"https://api.github.com/repos/plone/plonecli/tags","blobs_url":"https://api.github.com/repos/plone/plonecli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plone/plonecli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plone/plonecli/git/refs{/sha}","trees_url":"https://api.github.com/repos/plone/plonecli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plone/plonecli/statuses/{sha}","languages_url":"https://api.github.com/repos/plone/plonecli/languages","stargazers_url":"https://api.github.com/repos/plone/plonecli/stargazers","contributors_url":"https://api.github.com/repos/plone/plonecli/contributors","subscribers_url":"https://api.github.com/repos/plone/plonecli/subscribers","subscription_url":"https://api.github.com/repos/plone/plonecli/subscription","commits_url":"https://api.github.com/repos/plone/plonecli/commits{/sha}","git_commits_url":"https://api.github.com/repos/plone/plonecli/git/commits{/sha}","comments_url":"https://api.github.com/repos/plone/plonecli/comments{/number}","issue_comment_url":"https://api.github.com/repos/plone/plonecli/issues/comments{/number}","contents_url":"https://api.github.com/repos/plone/plonecli/contents/{+path}","compare_url":"https://api.github.com/repos/plone/plonecli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plone/plonecli/merges","archive_url":"https://api.github.com/repos/plone/plonecli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plone/plonecli/downloads","issues_url":"https://api.github.com/repos/plone/plonecli/issues{/number}","pulls_url":"https://api.github.com/repos/plone/plonecli/pulls{/number}","milestones_url":"https://api.github.com/repos/plone/plonecli/milestones{/number}","notifications_url":"https://api.github.com/repos/plone/plonecli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plone/plonecli/labels{/name}","releases_url":"https://api.github.com/repos/plone/plonecli/releases{/id}","deployments_url":"https://api.github.com/repos/plone/plonecli/deployments","created_at":"2017-10-21T08:26:33Z","updated_at":"2018-06-04T10:44:36Z","pushed_at":"2018-06-13T19:31:47Z","git_url":"git://github.com/plone/plonecli.git","ssh_url":"git@github.com:plone/plonecli.git","clone_url":"https://github.com/plone/plonecli.git","svn_url":"https://github.com/plone/plonecli","homepage":null,"size":13344,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":6,"watchers":7,"default_branch":"master"}},"base":{"label":"plone:master","ref":"master","sha":"a420a23c30549ac1178b9d2bd0347c85bdbed033","user":{"login":"plone","id":72034,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDM0","avatar_url":"https://avatars0.githubusercontent.com/u/72034?v=4","gravatar_id":"","url":"https://api.github.com/users/plone","html_url":"https://github.com/plone","followers_url":"https://api.github.com/users/plone/followers","following_url":"https://api.github.com/users/plone/following{/other_user}","gists_url":"https://api.github.com/users/plone/gists{/gist_id}","starred_url":"https://api.github.com/users/plone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plone/subscriptions","organizations_url":"https://api.github.com/users/plone/orgs","repos_url":"https://api.github.com/users/plone/repos","events_url":"https://api.github.com/users/plone/events{/privacy}","received_events_url":"https://api.github.com/users/plone/received_events","type":"Organization","site_admin":false},"repo":{"id":107764003,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc3NjQwMDM=","name":"plonecli","full_name":"plone/plonecli","owner":{"login":"plone","id":72034,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDM0","avatar_url":"https://avatars0.githubusercontent.com/u/72034?v=4","gravatar_id":"","url":"https://api.github.com/users/plone","html_url":"https://github.com/plone","followers_url":"https://api.github.com/users/plone/followers","following_url":"https://api.github.com/users/plone/following{/other_user}","gists_url":"https://api.github.com/users/plone/gists{/gist_id}","starred_url":"https://api.github.com/users/plone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plone/subscriptions","organizations_url":"https://api.github.com/users/plone/orgs","repos_url":"https://api.github.com/users/plone/repos","events_url":"https://api.github.com/users/plone/events{/privacy}","received_events_url":"https://api.github.com/users/plone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plone/plonecli","description":"A Plone command line client for mrbob","fork":false,"url":"https://api.github.com/repos/plone/plonecli","forks_url":"https://api.github.com/repos/plone/plonecli/forks","keys_url":"https://api.github.com/repos/plone/plonecli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plone/plonecli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plone/plonecli/teams","hooks_url":"https://api.github.com/repos/plone/plonecli/hooks","issue_events_url":"https://api.github.com/repos/plone/plonecli/issues/events{/number}","events_url":"https://api.github.com/repos/plone/plonecli/events","assignees_url":"https://api.github.com/repos/plone/plonecli/assignees{/user}","branches_url":"https://api.github.com/repos/plone/plonecli/branches{/branch}","tags_url":"https://api.github.com/repos/plone/plonecli/tags","blobs_url":"https://api.github.com/repos/plone/plonecli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plone/plonecli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plone/plonecli/git/refs{/sha}","trees_url":"https://api.github.com/repos/plone/plonecli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plone/plonecli/statuses/{sha}","languages_url":"https://api.github.com/repos/plone/plonecli/languages","stargazers_url":"https://api.github.com/repos/plone/plonecli/stargazers","contributors_url":"https://api.github.com/repos/plone/plonecli/contributors","subscribers_url":"https://api.github.com/repos/plone/plonecli/subscribers","subscription_url":"https://api.github.com/repos/plone/plonecli/subscription","commits_url":"https://api.github.com/repos/plone/plonecli/commits{/sha}","git_commits_url":"https://api.github.com/repos/plone/plonecli/git/commits{/sha}","comments_url":"https://api.github.com/repos/plone/plonecli/comments{/number}","issue_comment_url":"https://api.github.com/repos/plone/plonecli/issues/comments{/number}","contents_url":"https://api.github.com/repos/plone/plonecli/contents/{+path}","compare_url":"https://api.github.com/repos/plone/plonecli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plone/plonecli/merges","archive_url":"https://api.github.com/repos/plone/plonecli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plone/plonecli/downloads","issues_url":"https://api.github.com/repos/plone/plonecli/issues{/number}","pulls_url":"https://api.github.com/repos/plone/plonecli/pulls{/number}","milestones_url":"https://api.github.com/repos/plone/plonecli/milestones{/number}","notifications_url":"https://api.github.com/repos/plone/plonecli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plone/plonecli/labels{/name}","releases_url":"https://api.github.com/repos/plone/plonecli/releases{/id}","deployments_url":"https://api.github.com/repos/plone/plonecli/deployments","created_at":"2017-10-21T08:26:33Z","updated_at":"2018-06-04T10:44:36Z","pushed_at":"2018-06-13T19:31:47Z","git_url":"git://github.com/plone/plonecli.git","ssh_url":"git@github.com:plone/plonecli.git","clone_url":"https://github.com/plone/plonecli.git","svn_url":"https://github.com/plone/plonecli","homepage":null,"size":13344,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":6,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plone/plonecli/pulls/26"},"html":{"href":"https://github.com/plone/plonecli/pull/26"},"issue":{"href":"https://api.github.com/repos/plone/plonecli/issues/26"},"comments":{"href":"https://api.github.com/repos/plone/plonecli/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/plone/plonecli/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/plone/plonecli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plone/plonecli/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/plone/plonecli/statuses/fbd3ee1492876b34fc506b6c6e5ec0f565ea3b09"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MrTango"}}