{"action":"created","comment":{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/comments/68749208","id":68749208,"diff_hunk":"@@ -0,0 +1,79 @@\n+from Constants import classifiers\n+from Constants import encoding\n+from Constants import imports\n+import glob\n+import os\n+import re\n+import shutil\n+import sys\n+from coalib.collecting.Importers import iimport_objects\n+\n+\n+def main():\n+    # create dir and set the path to the working directory\n+    if not os.path.exists('upload'):\n+        os.mkdir('upload')\n+        sys.path.insert(0, '..')\n+\n+    bears_full_filenames = glob.glob('**/*Bear.py')\n+\n+    for bear_file_name in bears_full_filenames:\n+        file_name = bear_file_name\n+        bear_name = re.match(r'.+/(.*)\\.py', bear_file_name).group(1)\n+        bear_object = list(iimport_objects(file_name, attributes='kind',\n+                                           local=True))\n+        if not os.path.exists('upload/' + bear_name):\n+            os.mkdir(os.path.join('upload', bear_name))\n+        if not os.path.exists(os.path.join('upload', bear_name, bear_name)):\n+            os.mkdir(os.path.join('upload', bear_name, bear_name))\n+        if not os.path.exists(os.path.join('upload', bear_name, bear_name,\n+                                           '__init__.py')):\n+            init = open(os.path.join('upload', bear_name, bear_name,\n+                                     '__init__.py'), 'w')\n+            init.write(' ')\n+            init.close()\n+        shutil.copyfile(file_name, os.path.join('upload', bear_name, bear_name,\n+                                                bear_name + '.py'))\n+\n+        with open('upload/' + bear_name + '/setup.py', \"w\") as setup:\n+\n+            # set env\n+            setup.write('#!/usr/bin/env python3\\n')\n+\n+            # write imports\n+            setup.write(imports + '\\n\\n')\n+\n+            # encoding UTF-8\n+            setup.write(encoding + '\\n\\n')\n+\n+            # setuptools\n+            setup.write('if __name__== \"__main__\":\\n')\n+            setup.write(\"\\tsetup(name=\" + \"'\" + bear_name + \"',\\n\")\n+            setup.write('\\t\\t  version=\"0.1.30\",\\n')\n+            setup.write(\"\\t\\t  description='The \" +\n+                        bear_name + \" bear for coala (Code\")\n+            setup.write(\" Analysis Application)',\\n\")\n+            setup.write(\"\\t\\t  authors=\" + str(bear_object[0].AUTHORS) + \",\\n\")\n+            setup.write(\"\\t\\t  authors_emails=\"\n+                        + str(bear_object[0].AUTHORS_EMAILS) + \",\\n\")\n+            setup.write(\"\\t\\t  maintainers=\" + str(bear_object[0].maintainers)\n+                        + \",\\n\")\n+            setup.write(\"\\t\\t  maintainers_emails=\"\n+                        + str(bear_object[0].maintainers_emails) + \",\\n\")\n+            setup.write(\"\\t\\t  platforms='\" + str(bear_object[0].PLATFORMS)\n+                        + \"',\\n\")\n+            setup.write(\"\\t\\t  license='\" +\n+                        str(bear_object[0].LICENSE) + \"',\\n\")\n+            setup.write('\\t\\t  classifiers=' + classifiers + ')')\n+\n+            # upload everything\n+\n+            os.chdir(os.path.join('upload', bear_name))\n+            #subprocess.call(['python', 'setup.py', 'register', '-r',\n+            #                 'pypitest'])\n+            #subprocess.call(['python', 'setup.py', 'sdist', 'upload', '-r',","path":"bears/uploadTool.py","position":74,"original_position":74,"commit_id":"8056eb40176aa3ceba2b88ff1567f49cf4ebe7b1","original_commit_id":"8056eb40176aa3ceba2b88ff1567f49cf4ebe7b1","user":{"login":"gitmate-bot","id":15421488,"avatar_url":"https://avatars.githubusercontent.com/u/15421488?v=3","gravatar_id":"","url":"https://api.github.com/users/gitmate-bot","html_url":"https://github.com/gitmate-bot","followers_url":"https://api.github.com/users/gitmate-bot/followers","following_url":"https://api.github.com/users/gitmate-bot/following{/other_user}","gists_url":"https://api.github.com/users/gitmate-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/gitmate-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitmate-bot/subscriptions","organizations_url":"https://api.github.com/users/gitmate-bot/orgs","repos_url":"https://api.github.com/users/gitmate-bot/repos","events_url":"https://api.github.com/users/gitmate-bot/events{/privacy}","received_events_url":"https://api.github.com/users/gitmate-bot/received_events","type":"User","site_admin":false},"body":"The code does not comply to PEP8.\n\n*PEP8Bear, severity NORMAL, section `autopep8`.*\n\nThe issue can be fixed by applying the following patch:\n\n```diff\n--- a/bears/uploadTool.py\n+++ b/bears/uploadTool.py\n@@ -71,7 +71,7 @@\n             os.chdir(os.path.join('upload', bear_name))\n             #subprocess.call(['python', 'setup.py', 'register', '-r',\n             #                 'pypitest'])\n-            #subprocess.call(['python', 'setup.py', 'sdist', 'upload', '-r',\n+            # subprocess.call(['python', 'setup.py', 'sdist', 'upload', '-r',\n             #                 'pypitest'])\n             os.chdir(os.path.join('..', '..'))\n \n```","created_at":"2016-06-28T12:48:01Z","updated_at":"2016-06-28T12:48:01Z","html_url":"https://github.com/coala-analyzer/coala-bears/pull/561#discussion_r68749208","pull_request_url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561","_links":{"self":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/comments/68749208"},"html":{"href":"https://github.com/coala-analyzer/coala-bears/pull/561#discussion_r68749208"},"pull_request":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561"}}},"pull_request":{"url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561","id":75467399,"html_url":"https://github.com/coala-analyzer/coala-bears/pull/561","diff_url":"https://github.com/coala-analyzer/coala-bears/pull/561.diff","patch_url":"https://github.com/coala-analyzer/coala-bears/pull/561.patch","issue_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/561","number":561,"state":"open","locked":false,"title":"uploadTool: Add it","user":{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-28T12:21:38Z","updated_at":"2016-06-28T12:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b15a679a675b62f6d1b83ec372e9de6781d8386","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561/commits","review_comments_url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561/comments","review_comment_url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/561/comments","statuses_url":"https://api.github.com/repos/coala-analyzer/coala-bears/statuses/8056eb40176aa3ceba2b88ff1567f49cf4ebe7b1","head":{"label":"Adrianzatreanu:uploadTool","ref":"uploadTool","sha":"8056eb40176aa3ceba2b88ff1567f49cf4ebe7b1","user":{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false},"repo":{"id":52351313,"name":"coala-bears","full_name":"Adrianzatreanu/coala-bears","owner":{"login":"Adrianzatreanu","id":15572459,"avatar_url":"https://avatars.githubusercontent.com/u/15572459?v=3","gravatar_id":"","url":"https://api.github.com/users/Adrianzatreanu","html_url":"https://github.com/Adrianzatreanu","followers_url":"https://api.github.com/users/Adrianzatreanu/followers","following_url":"https://api.github.com/users/Adrianzatreanu/following{/other_user}","gists_url":"https://api.github.com/users/Adrianzatreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/Adrianzatreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adrianzatreanu/subscriptions","organizations_url":"https://api.github.com/users/Adrianzatreanu/orgs","repos_url":"https://api.github.com/users/Adrianzatreanu/repos","events_url":"https://api.github.com/users/Adrianzatreanu/events{/privacy}","received_events_url":"https://api.github.com/users/Adrianzatreanu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Adrianzatreanu/coala-bears","description":"Bears for coala","fork":true,"url":"https://api.github.com/repos/Adrianzatreanu/coala-bears","forks_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/forks","keys_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/teams","hooks_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/hooks","issue_events_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/issues/events{/number}","events_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/events","assignees_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/assignees{/user}","branches_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/branches{/branch}","tags_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/tags","blobs_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/git/refs{/sha}","trees_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/statuses/{sha}","languages_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/languages","stargazers_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/stargazers","contributors_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/contributors","subscribers_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/subscribers","subscription_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/subscription","commits_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/commits{/sha}","git_commits_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/git/commits{/sha}","comments_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/comments{/number}","issue_comment_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/issues/comments{/number}","contents_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/contents/{+path}","compare_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/merges","archive_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/downloads","issues_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/issues{/number}","pulls_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/pulls{/number}","milestones_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/milestones{/number}","notifications_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/labels{/name}","releases_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/releases{/id}","deployments_url":"https://api.github.com/repos/Adrianzatreanu/coala-bears/deployments","created_at":"2016-02-23T10:36:15Z","updated_at":"2016-02-23T10:36:16Z","pushed_at":"2016-06-28T12:47:19Z","git_url":"git://github.com/Adrianzatreanu/coala-bears.git","ssh_url":"git@github.com:Adrianzatreanu/coala-bears.git","clone_url":"https://github.com/Adrianzatreanu/coala-bears.git","svn_url":"https://github.com/Adrianzatreanu/coala-bears","homepage":"http://coala-analyzer.org/","size":623,"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":"coala-analyzer:master","ref":"master","sha":"ed6c195d3d5e4b000e11cfcd8fcd28b4cb1caa1e","user":{"login":"coala-analyzer","id":10620750,"avatar_url":"https://avatars.githubusercontent.com/u/10620750?v=3","gravatar_id":"","url":"https://api.github.com/users/coala-analyzer","html_url":"https://github.com/coala-analyzer","followers_url":"https://api.github.com/users/coala-analyzer/followers","following_url":"https://api.github.com/users/coala-analyzer/following{/other_user}","gists_url":"https://api.github.com/users/coala-analyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/coala-analyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala-analyzer/subscriptions","organizations_url":"https://api.github.com/users/coala-analyzer/orgs","repos_url":"https://api.github.com/users/coala-analyzer/repos","events_url":"https://api.github.com/users/coala-analyzer/events{/privacy}","received_events_url":"https://api.github.com/users/coala-analyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":51688289,"name":"coala-bears","full_name":"coala-analyzer/coala-bears","owner":{"login":"coala-analyzer","id":10620750,"avatar_url":"https://avatars.githubusercontent.com/u/10620750?v=3","gravatar_id":"","url":"https://api.github.com/users/coala-analyzer","html_url":"https://github.com/coala-analyzer","followers_url":"https://api.github.com/users/coala-analyzer/followers","following_url":"https://api.github.com/users/coala-analyzer/following{/other_user}","gists_url":"https://api.github.com/users/coala-analyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/coala-analyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala-analyzer/subscriptions","organizations_url":"https://api.github.com/users/coala-analyzer/orgs","repos_url":"https://api.github.com/users/coala-analyzer/repos","events_url":"https://api.github.com/users/coala-analyzer/events{/privacy}","received_events_url":"https://api.github.com/users/coala-analyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coala-analyzer/coala-bears","description":"Bears for coala","fork":false,"url":"https://api.github.com/repos/coala-analyzer/coala-bears","forks_url":"https://api.github.com/repos/coala-analyzer/coala-bears/forks","keys_url":"https://api.github.com/repos/coala-analyzer/coala-bears/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coala-analyzer/coala-bears/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coala-analyzer/coala-bears/teams","hooks_url":"https://api.github.com/repos/coala-analyzer/coala-bears/hooks","issue_events_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/events{/number}","events_url":"https://api.github.com/repos/coala-analyzer/coala-bears/events","assignees_url":"https://api.github.com/repos/coala-analyzer/coala-bears/assignees{/user}","branches_url":"https://api.github.com/repos/coala-analyzer/coala-bears/branches{/branch}","tags_url":"https://api.github.com/repos/coala-analyzer/coala-bears/tags","blobs_url":"https://api.github.com/repos/coala-analyzer/coala-bears/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coala-analyzer/coala-bears/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coala-analyzer/coala-bears/git/refs{/sha}","trees_url":"https://api.github.com/repos/coala-analyzer/coala-bears/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coala-analyzer/coala-bears/statuses/{sha}","languages_url":"https://api.github.com/repos/coala-analyzer/coala-bears/languages","stargazers_url":"https://api.github.com/repos/coala-analyzer/coala-bears/stargazers","contributors_url":"https://api.github.com/repos/coala-analyzer/coala-bears/contributors","subscribers_url":"https://api.github.com/repos/coala-analyzer/coala-bears/subscribers","subscription_url":"https://api.github.com/repos/coala-analyzer/coala-bears/subscription","commits_url":"https://api.github.com/repos/coala-analyzer/coala-bears/commits{/sha}","git_commits_url":"https://api.github.com/repos/coala-analyzer/coala-bears/git/commits{/sha}","comments_url":"https://api.github.com/repos/coala-analyzer/coala-bears/comments{/number}","issue_comment_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/comments{/number}","contents_url":"https://api.github.com/repos/coala-analyzer/coala-bears/contents/{+path}","compare_url":"https://api.github.com/repos/coala-analyzer/coala-bears/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coala-analyzer/coala-bears/merges","archive_url":"https://api.github.com/repos/coala-analyzer/coala-bears/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coala-analyzer/coala-bears/downloads","issues_url":"https://api.github.com/repos/coala-analyzer/coala-bears/issues{/number}","pulls_url":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls{/number}","milestones_url":"https://api.github.com/repos/coala-analyzer/coala-bears/milestones{/number}","notifications_url":"https://api.github.com/repos/coala-analyzer/coala-bears/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coala-analyzer/coala-bears/labels{/name}","releases_url":"https://api.github.com/repos/coala-analyzer/coala-bears/releases{/id}","deployments_url":"https://api.github.com/repos/coala-analyzer/coala-bears/deployments","created_at":"2016-02-14T09:25:11Z","updated_at":"2016-06-13T19:52:49Z","pushed_at":"2016-06-28T12:47:20Z","git_url":"git://github.com/coala-analyzer/coala-bears.git","ssh_url":"git@github.com:coala-analyzer/coala-bears.git","clone_url":"https://github.com/coala-analyzer/coala-bears.git","svn_url":"https://github.com/coala-analyzer/coala-bears","homepage":"http://coala-analyzer.org/","size":805,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":138,"forks":57,"open_issues":138,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561"},"html":{"href":"https://github.com/coala-analyzer/coala-bears/pull/561"},"issue":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/561"},"comments":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/issues/561/comments"},"review_comments":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561/comments"},"review_comment":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/pulls/561/commits"},"statuses":{"href":"https://api.github.com/repos/coala-analyzer/coala-bears/statuses/8056eb40176aa3ceba2b88ff1567f49cf4ebe7b1"}}}}
{"actor":{"display_login":"gitmate-bot"}}