{"action":"created","comment":{"url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/comments/158626819","pull_request_review_id":85465755,"id":158626819,"diff_hunk":"@@ -0,0 +1,108 @@\n+\"\"\"\n+Handle handles creating and updating WCosa projects\n+\"\"\"\n+\n+from shutil import copyfile\n+from colorama import Fore\n+from core.scripts.others.output import write, writeln\n+from core.scripts.others import helper\n+import core.scripts.templates.config as config\n+import core.scripts.templates.cmake as cmake\n+\n+\n+def create_wcosa(path, board, ide):\n+    \"\"\"Creates WCosa project from scratch\"\"\"\n+\n+    project_path = path\n+\n+    if path is None:\n+        project_path = helper.get_working_directory()\n+\n+    if ide is None:\n+        ide = \"\"\n+    else:\n+        ide = ide.strip(\" \")\n+\n+    templates_path = helper.get_wcosa_path() + \"/core/templates\"\n+    user_config_path = project_path + \"/config.json\"\n+    internal_config_path = project_path + \"/wcosa/internal-config.json\"\n+    general_cmake_path = project_path + \"/wcosa/CMakeLists.txt\"\n+\n+    write(\"Creating work environment - \", color=Fore.CYAN)\n+\n+    # create src, lib, and wcosa folders\n+    helper.create_folder(project_path + \"/src\", True)\n+    helper.create_folder(project_path + \"/lib\", True)\n+    helper.create_folder(project_path + \"/wcosa\", True)\n+    helper.create_folder(project_path + \"/wcosa/bin\", True)\n+\n+    # copy all then CMakeLists templates and configuration templates\n+    copyfile(templates_path + \"/cmake/CMakeLists.txt.tpl\", general_cmake_path)\n+    copyfile(templates_path + \"/config/internal-config.json.tpl\", internal_config_path)\n+    copyfile(templates_path + \"/config/config.json.tpl\", user_config_path)\n+\n+    if ide == \"clion\":\n+        copyfile(templates_path + \"/ide/clion/CMakeLists.txt.tpl\", project_path + \"/CMakeLists.txt\")\n+\n+    writeln(\"done\")\n+    write(\"Updating configurations based on the system - \", color=Fore.CYAN)\n+\n+    user_data = config.fill_user_config(user_config_path, board, \"None\", ide)  # give a dummy port right now\n+    project_data = config.fill_internal_config(internal_config_path, path, user_data)\n+\n+    import core.scripts.templates.cmake as cmake","path":"core/scripts/handle.py","position":53,"original_position":53,"commit_id":"acf39f84ba25077b7b19482868a2b1a589701876","original_commit_id":"acf39f84ba25077b7b19482868a2b1a589701876","user":{"login":"Mogball","id":15016832,"avatar_url":"https://avatars0.githubusercontent.com/u/15016832?v=4","gravatar_id":"","url":"https://api.github.com/users/Mogball","html_url":"https://github.com/Mogball","followers_url":"https://api.github.com/users/Mogball/followers","following_url":"https://api.github.com/users/Mogball/following{/other_user}","gists_url":"https://api.github.com/users/Mogball/gists{/gist_id}","starred_url":"https://api.github.com/users/Mogball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mogball/subscriptions","organizations_url":"https://api.github.com/users/Mogball/orgs","repos_url":"https://api.github.com/users/Mogball/repos","events_url":"https://api.github.com/users/Mogball/events{/privacy}","received_events_url":"https://api.github.com/users/Mogball/received_events","type":"User","site_admin":false},"body":"Why are you importing again here?","created_at":"2017-12-25T07:36:18Z","updated_at":"2017-12-25T08:03:56Z","html_url":"https://github.com/teamwaterloop/wcosa/pull/8#discussion_r158626819","pull_request_url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/comments/158626819"},"html":{"href":"https://github.com/teamwaterloop/wcosa/pull/8#discussion_r158626819"},"pull_request":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8","id":160023205,"html_url":"https://github.com/teamwaterloop/wcosa/pull/8","diff_url":"https://github.com/teamwaterloop/wcosa/pull/8.diff","patch_url":"https://github.com/teamwaterloop/wcosa/pull/8.patch","issue_url":"https://api.github.com/repos/teamwaterloop/wcosa/issues/8","number":8,"state":"open","locked":false,"title":"[FT] created script to create and update wcosa projects","user":{"login":"dhillondeep","id":17806271,"avatar_url":"https://avatars2.githubusercontent.com/u/17806271?v=4","gravatar_id":"","url":"https://api.github.com/users/dhillondeep","html_url":"https://github.com/dhillondeep","followers_url":"https://api.github.com/users/dhillondeep/followers","following_url":"https://api.github.com/users/dhillondeep/following{/other_user}","gists_url":"https://api.github.com/users/dhillondeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dhillondeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhillondeep/subscriptions","organizations_url":"https://api.github.com/users/dhillondeep/orgs","repos_url":"https://api.github.com/users/dhillondeep/repos","events_url":"https://api.github.com/users/dhillondeep/events{/privacy}","received_events_url":"https://api.github.com/users/dhillondeep/received_events","type":"User","site_admin":false},"body":"Don't mind the commits, I have messed up my rebasing. This commit now allows for creating a project and updating it. Other files have been updated to fix bugs that were encountered while doing some tests","created_at":"2017-12-25T04:42:10Z","updated_at":"2017-12-25T08:03:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41ad05267487d4b9b739ab44e8a178b1470da943","assignee":{"login":"dhillondeep","id":17806271,"avatar_url":"https://avatars2.githubusercontent.com/u/17806271?v=4","gravatar_id":"","url":"https://api.github.com/users/dhillondeep","html_url":"https://github.com/dhillondeep","followers_url":"https://api.github.com/users/dhillondeep/followers","following_url":"https://api.github.com/users/dhillondeep/following{/other_user}","gists_url":"https://api.github.com/users/dhillondeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dhillondeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhillondeep/subscriptions","organizations_url":"https://api.github.com/users/dhillondeep/orgs","repos_url":"https://api.github.com/users/dhillondeep/repos","events_url":"https://api.github.com/users/dhillondeep/events{/privacy}","received_events_url":"https://api.github.com/users/dhillondeep/received_events","type":"User","site_admin":false},"assignees":[{"login":"dhillondeep","id":17806271,"avatar_url":"https://avatars2.githubusercontent.com/u/17806271?v=4","gravatar_id":"","url":"https://api.github.com/users/dhillondeep","html_url":"https://github.com/dhillondeep","followers_url":"https://api.github.com/users/dhillondeep/followers","following_url":"https://api.github.com/users/dhillondeep/following{/other_user}","gists_url":"https://api.github.com/users/dhillondeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dhillondeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhillondeep/subscriptions","organizations_url":"https://api.github.com/users/dhillondeep/orgs","repos_url":"https://api.github.com/users/dhillondeep/repos","events_url":"https://api.github.com/users/dhillondeep/events{/privacy}","received_events_url":"https://api.github.com/users/dhillondeep/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8/commits","review_comments_url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8/comments","review_comment_url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teamwaterloop/wcosa/issues/8/comments","statuses_url":"https://api.github.com/repos/teamwaterloop/wcosa/statuses/acf39f84ba25077b7b19482868a2b1a589701876","head":{"label":"dhillondeep:wcosa-create-update","ref":"wcosa-create-update","sha":"acf39f84ba25077b7b19482868a2b1a589701876","user":{"login":"dhillondeep","id":17806271,"avatar_url":"https://avatars2.githubusercontent.com/u/17806271?v=4","gravatar_id":"","url":"https://api.github.com/users/dhillondeep","html_url":"https://github.com/dhillondeep","followers_url":"https://api.github.com/users/dhillondeep/followers","following_url":"https://api.github.com/users/dhillondeep/following{/other_user}","gists_url":"https://api.github.com/users/dhillondeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dhillondeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhillondeep/subscriptions","organizations_url":"https://api.github.com/users/dhillondeep/orgs","repos_url":"https://api.github.com/users/dhillondeep/repos","events_url":"https://api.github.com/users/dhillondeep/events{/privacy}","received_events_url":"https://api.github.com/users/dhillondeep/received_events","type":"User","site_admin":false},"repo":{"id":114580301,"name":"wcosa","full_name":"dhillondeep/wcosa","owner":{"login":"dhillondeep","id":17806271,"avatar_url":"https://avatars2.githubusercontent.com/u/17806271?v=4","gravatar_id":"","url":"https://api.github.com/users/dhillondeep","html_url":"https://github.com/dhillondeep","followers_url":"https://api.github.com/users/dhillondeep/followers","following_url":"https://api.github.com/users/dhillondeep/following{/other_user}","gists_url":"https://api.github.com/users/dhillondeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dhillondeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhillondeep/subscriptions","organizations_url":"https://api.github.com/users/dhillondeep/orgs","repos_url":"https://api.github.com/users/dhillondeep/repos","events_url":"https://api.github.com/users/dhillondeep/events{/privacy}","received_events_url":"https://api.github.com/users/dhillondeep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhillondeep/wcosa","description":"Embedded build system based on Cosa","fork":true,"url":"https://api.github.com/repos/dhillondeep/wcosa","forks_url":"https://api.github.com/repos/dhillondeep/wcosa/forks","keys_url":"https://api.github.com/repos/dhillondeep/wcosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhillondeep/wcosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhillondeep/wcosa/teams","hooks_url":"https://api.github.com/repos/dhillondeep/wcosa/hooks","issue_events_url":"https://api.github.com/repos/dhillondeep/wcosa/issues/events{/number}","events_url":"https://api.github.com/repos/dhillondeep/wcosa/events","assignees_url":"https://api.github.com/repos/dhillondeep/wcosa/assignees{/user}","branches_url":"https://api.github.com/repos/dhillondeep/wcosa/branches{/branch}","tags_url":"https://api.github.com/repos/dhillondeep/wcosa/tags","blobs_url":"https://api.github.com/repos/dhillondeep/wcosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhillondeep/wcosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhillondeep/wcosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhillondeep/wcosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhillondeep/wcosa/statuses/{sha}","languages_url":"https://api.github.com/repos/dhillondeep/wcosa/languages","stargazers_url":"https://api.github.com/repos/dhillondeep/wcosa/stargazers","contributors_url":"https://api.github.com/repos/dhillondeep/wcosa/contributors","subscribers_url":"https://api.github.com/repos/dhillondeep/wcosa/subscribers","subscription_url":"https://api.github.com/repos/dhillondeep/wcosa/subscription","commits_url":"https://api.github.com/repos/dhillondeep/wcosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhillondeep/wcosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhillondeep/wcosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhillondeep/wcosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhillondeep/wcosa/contents/{+path}","compare_url":"https://api.github.com/repos/dhillondeep/wcosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhillondeep/wcosa/merges","archive_url":"https://api.github.com/repos/dhillondeep/wcosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhillondeep/wcosa/downloads","issues_url":"https://api.github.com/repos/dhillondeep/wcosa/issues{/number}","pulls_url":"https://api.github.com/repos/dhillondeep/wcosa/pulls{/number}","milestones_url":"https://api.github.com/repos/dhillondeep/wcosa/milestones{/number}","notifications_url":"https://api.github.com/repos/dhillondeep/wcosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhillondeep/wcosa/labels{/name}","releases_url":"https://api.github.com/repos/dhillondeep/wcosa/releases{/id}","deployments_url":"https://api.github.com/repos/dhillondeep/wcosa/deployments","created_at":"2017-12-18T00:51:47Z","updated_at":"2017-12-20T15:23:41Z","pushed_at":"2017-12-25T04:53:56Z","git_url":"git://github.com/dhillondeep/wcosa.git","ssh_url":"git@github.com:dhillondeep/wcosa.git","clone_url":"https://github.com/dhillondeep/wcosa.git","svn_url":"https://github.com/dhillondeep/wcosa","homepage":null,"size":2770,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"teamwaterloop:master","ref":"master","sha":"0f7f55bcdd3ef95272a275642a6320ade7832ed5","user":{"login":"teamwaterloop","id":23698487,"avatar_url":"https://avatars1.githubusercontent.com/u/23698487?v=4","gravatar_id":"","url":"https://api.github.com/users/teamwaterloop","html_url":"https://github.com/teamwaterloop","followers_url":"https://api.github.com/users/teamwaterloop/followers","following_url":"https://api.github.com/users/teamwaterloop/following{/other_user}","gists_url":"https://api.github.com/users/teamwaterloop/gists{/gist_id}","starred_url":"https://api.github.com/users/teamwaterloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamwaterloop/subscriptions","organizations_url":"https://api.github.com/users/teamwaterloop/orgs","repos_url":"https://api.github.com/users/teamwaterloop/repos","events_url":"https://api.github.com/users/teamwaterloop/events{/privacy}","received_events_url":"https://api.github.com/users/teamwaterloop/received_events","type":"Organization","site_admin":false},"repo":{"id":114573615,"name":"wcosa","full_name":"teamwaterloop/wcosa","owner":{"login":"teamwaterloop","id":23698487,"avatar_url":"https://avatars1.githubusercontent.com/u/23698487?v=4","gravatar_id":"","url":"https://api.github.com/users/teamwaterloop","html_url":"https://github.com/teamwaterloop","followers_url":"https://api.github.com/users/teamwaterloop/followers","following_url":"https://api.github.com/users/teamwaterloop/following{/other_user}","gists_url":"https://api.github.com/users/teamwaterloop/gists{/gist_id}","starred_url":"https://api.github.com/users/teamwaterloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamwaterloop/subscriptions","organizations_url":"https://api.github.com/users/teamwaterloop/orgs","repos_url":"https://api.github.com/users/teamwaterloop/repos","events_url":"https://api.github.com/users/teamwaterloop/events{/privacy}","received_events_url":"https://api.github.com/users/teamwaterloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamwaterloop/wcosa","description":"Cosa AVR development environment","fork":false,"url":"https://api.github.com/repos/teamwaterloop/wcosa","forks_url":"https://api.github.com/repos/teamwaterloop/wcosa/forks","keys_url":"https://api.github.com/repos/teamwaterloop/wcosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamwaterloop/wcosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamwaterloop/wcosa/teams","hooks_url":"https://api.github.com/repos/teamwaterloop/wcosa/hooks","issue_events_url":"https://api.github.com/repos/teamwaterloop/wcosa/issues/events{/number}","events_url":"https://api.github.com/repos/teamwaterloop/wcosa/events","assignees_url":"https://api.github.com/repos/teamwaterloop/wcosa/assignees{/user}","branches_url":"https://api.github.com/repos/teamwaterloop/wcosa/branches{/branch}","tags_url":"https://api.github.com/repos/teamwaterloop/wcosa/tags","blobs_url":"https://api.github.com/repos/teamwaterloop/wcosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamwaterloop/wcosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamwaterloop/wcosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamwaterloop/wcosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamwaterloop/wcosa/statuses/{sha}","languages_url":"https://api.github.com/repos/teamwaterloop/wcosa/languages","stargazers_url":"https://api.github.com/repos/teamwaterloop/wcosa/stargazers","contributors_url":"https://api.github.com/repos/teamwaterloop/wcosa/contributors","subscribers_url":"https://api.github.com/repos/teamwaterloop/wcosa/subscribers","subscription_url":"https://api.github.com/repos/teamwaterloop/wcosa/subscription","commits_url":"https://api.github.com/repos/teamwaterloop/wcosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamwaterloop/wcosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamwaterloop/wcosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamwaterloop/wcosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamwaterloop/wcosa/contents/{+path}","compare_url":"https://api.github.com/repos/teamwaterloop/wcosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamwaterloop/wcosa/merges","archive_url":"https://api.github.com/repos/teamwaterloop/wcosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamwaterloop/wcosa/downloads","issues_url":"https://api.github.com/repos/teamwaterloop/wcosa/issues{/number}","pulls_url":"https://api.github.com/repos/teamwaterloop/wcosa/pulls{/number}","milestones_url":"https://api.github.com/repos/teamwaterloop/wcosa/milestones{/number}","notifications_url":"https://api.github.com/repos/teamwaterloop/wcosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamwaterloop/wcosa/labels{/name}","releases_url":"https://api.github.com/repos/teamwaterloop/wcosa/releases{/id}","deployments_url":"https://api.github.com/repos/teamwaterloop/wcosa/deployments","created_at":"2017-12-17T22:33:05Z","updated_at":"2017-12-22T07:05:25Z","pushed_at":"2017-12-25T04:53:57Z","git_url":"git://github.com/teamwaterloop/wcosa.git","ssh_url":"git@github.com:teamwaterloop/wcosa.git","clone_url":"https://github.com/teamwaterloop/wcosa.git","svn_url":"https://github.com/teamwaterloop/wcosa","homepage":"","size":43,"stargazers_count":1,"watchers_count":1,"language":"CMake","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8"},"html":{"href":"https://github.com/teamwaterloop/wcosa/pull/8"},"issue":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/issues/8"},"comments":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/teamwaterloop/wcosa/statuses/acf39f84ba25077b7b19482868a2b1a589701876"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Mogball"}}