{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/comments/55986348","id":55986348,"diff_hunk":"@@ -145,14 +145,26 @@ def run(self):\n             nulecule_artifacts = []\n \n             os.makedirs(path)\n-            filepath = os.path.join(path, \"artifacts.json\")\n-            nulecule_artifacts.append(\"file://{}\".format(os.path.relpath(\n-                filepath, nulecule_dir)))\n-            anymarkup.serialize_file(exported_project[provider].artifacts,\n-                                     filepath,\n-                                     format=\"json\")\n+            # create artifact files\n+            for artifact in exported_project[provider].artifacts:\n+                if \"name\" in artifact[\"metadata\"]:\n+                    name = artifact[\"metadata\"][\"name\"]\n+                else:\n+                    name = \"unknown\"\n+                kind = artifact[\"kind\"]\n+                filename = \"{}-{}.json\".format(name, kind)\n+                filepath = os.path.join(artifacts_dir, filename)\n+                if os.path.exists(filepath):\n+                    filepath = utils.get_new_name(filepath)\n+                    print filepath\n+                else:\n+                    nulecule_artifacts.append(\"file://{}\".format(os.path.relpath(\n+                        filepath, nulecule_dir)))","path":"openshift2nulecule/cli/main.py","position":24,"original_position":24,"commit_id":"787986c6a9945b6719528272711858c5ba876b70","original_commit_id":"787986c6a9945b6719528272711858c5ba876b70","user":{"login":"kadel","id":57206,"avatar_url":"https://avatars.githubusercontent.com/u/57206?v=3","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"body":"Oh, my bad. Whole else statement is  is horribly wrong :disappointed: ","created_at":"2016-03-14T11:24:44Z","updated_at":"2016-03-14T11:24:44Z","html_url":"https://github.com/projectatomic/openshift2nulecule/pull/30#discussion_r55986348","pull_request_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/comments/55986348"},"html":{"href":"https://github.com/projectatomic/openshift2nulecule/pull/30#discussion_r55986348"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30","id":62395747,"html_url":"https://github.com/projectatomic/openshift2nulecule/pull/30","diff_url":"https://github.com/projectatomic/openshift2nulecule/pull/30.diff","patch_url":"https://github.com/projectatomic/openshift2nulecule/pull/30.patch","issue_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/30","number":30,"state":"open","locked":false,"title":"Put every exported resource to separate artifact file","user":{"login":"kadel","id":57206,"avatar_url":"https://avatars.githubusercontent.com/u/57206?v=3","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"body":"fixes #7 ","created_at":"2016-03-10T14:19:04Z","updated_at":"2016-03-14T11:24:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c35c7961c4e2f6d91a41ea5f1e2d1ebf79c4ffe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30/commits","review_comments_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30/comments","review_comment_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/30/comments","statuses_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/statuses/787986c6a9945b6719528272711858c5ba876b70","head":{"label":"kadel:break-artifacts","ref":"break-artifacts","sha":"787986c6a9945b6719528272711858c5ba876b70","user":{"login":"kadel","id":57206,"avatar_url":"https://avatars.githubusercontent.com/u/57206?v=3","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"repo":{"id":51936001,"name":"openshift2nulecule","full_name":"kadel/openshift2nulecule","owner":{"login":"kadel","id":57206,"avatar_url":"https://avatars.githubusercontent.com/u/57206?v=3","gravatar_id":"","url":"https://api.github.com/users/kadel","html_url":"https://github.com/kadel","followers_url":"https://api.github.com/users/kadel/followers","following_url":"https://api.github.com/users/kadel/following{/other_user}","gists_url":"https://api.github.com/users/kadel/gists{/gist_id}","starred_url":"https://api.github.com/users/kadel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadel/subscriptions","organizations_url":"https://api.github.com/users/kadel/orgs","repos_url":"https://api.github.com/users/kadel/repos","events_url":"https://api.github.com/users/kadel/events{/privacy}","received_events_url":"https://api.github.com/users/kadel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kadel/openshift2nulecule","description":"Create Nulecule application from OpenShift project","fork":true,"url":"https://api.github.com/repos/kadel/openshift2nulecule","forks_url":"https://api.github.com/repos/kadel/openshift2nulecule/forks","keys_url":"https://api.github.com/repos/kadel/openshift2nulecule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kadel/openshift2nulecule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kadel/openshift2nulecule/teams","hooks_url":"https://api.github.com/repos/kadel/openshift2nulecule/hooks","issue_events_url":"https://api.github.com/repos/kadel/openshift2nulecule/issues/events{/number}","events_url":"https://api.github.com/repos/kadel/openshift2nulecule/events","assignees_url":"https://api.github.com/repos/kadel/openshift2nulecule/assignees{/user}","branches_url":"https://api.github.com/repos/kadel/openshift2nulecule/branches{/branch}","tags_url":"https://api.github.com/repos/kadel/openshift2nulecule/tags","blobs_url":"https://api.github.com/repos/kadel/openshift2nulecule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kadel/openshift2nulecule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kadel/openshift2nulecule/git/refs{/sha}","trees_url":"https://api.github.com/repos/kadel/openshift2nulecule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kadel/openshift2nulecule/statuses/{sha}","languages_url":"https://api.github.com/repos/kadel/openshift2nulecule/languages","stargazers_url":"https://api.github.com/repos/kadel/openshift2nulecule/stargazers","contributors_url":"https://api.github.com/repos/kadel/openshift2nulecule/contributors","subscribers_url":"https://api.github.com/repos/kadel/openshift2nulecule/subscribers","subscription_url":"https://api.github.com/repos/kadel/openshift2nulecule/subscription","commits_url":"https://api.github.com/repos/kadel/openshift2nulecule/commits{/sha}","git_commits_url":"https://api.github.com/repos/kadel/openshift2nulecule/git/commits{/sha}","comments_url":"https://api.github.com/repos/kadel/openshift2nulecule/comments{/number}","issue_comment_url":"https://api.github.com/repos/kadel/openshift2nulecule/issues/comments{/number}","contents_url":"https://api.github.com/repos/kadel/openshift2nulecule/contents/{+path}","compare_url":"https://api.github.com/repos/kadel/openshift2nulecule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kadel/openshift2nulecule/merges","archive_url":"https://api.github.com/repos/kadel/openshift2nulecule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kadel/openshift2nulecule/downloads","issues_url":"https://api.github.com/repos/kadel/openshift2nulecule/issues{/number}","pulls_url":"https://api.github.com/repos/kadel/openshift2nulecule/pulls{/number}","milestones_url":"https://api.github.com/repos/kadel/openshift2nulecule/milestones{/number}","notifications_url":"https://api.github.com/repos/kadel/openshift2nulecule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kadel/openshift2nulecule/labels{/name}","releases_url":"https://api.github.com/repos/kadel/openshift2nulecule/releases{/id}","deployments_url":"https://api.github.com/repos/kadel/openshift2nulecule/deployments","created_at":"2016-02-17T16:14:41Z","updated_at":"2016-02-17T16:14:42Z","pushed_at":"2016-03-14T10:47:10Z","git_url":"git://github.com/kadel/openshift2nulecule.git","ssh_url":"git@github.com:kadel/openshift2nulecule.git","clone_url":"https://github.com/kadel/openshift2nulecule.git","svn_url":"https://github.com/kadel/openshift2nulecule","homepage":null,"size":81,"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":"projectatomic:master","ref":"master","sha":"b49f4de82dc8eeb537c8d327a3fbb92bbbdde418","user":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"repo":{"id":51935066,"name":"openshift2nulecule","full_name":"projectatomic/openshift2nulecule","owner":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectatomic/openshift2nulecule","description":"Create Nulecule application from OpenShift project","fork":false,"url":"https://api.github.com/repos/projectatomic/openshift2nulecule","forks_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/forks","keys_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/teams","hooks_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/hooks","issue_events_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/events{/number}","events_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/events","assignees_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/assignees{/user}","branches_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/branches{/branch}","tags_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/tags","blobs_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/statuses/{sha}","languages_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/languages","stargazers_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/stargazers","contributors_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/contributors","subscribers_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/subscribers","subscription_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/subscription","commits_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/contents/{+path}","compare_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/merges","archive_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/downloads","issues_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues{/number}","pulls_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls{/number}","milestones_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/milestones{/number}","notifications_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/labels{/name}","releases_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/releases{/id}","deployments_url":"https://api.github.com/repos/projectatomic/openshift2nulecule/deployments","created_at":"2016-02-17T16:02:10Z","updated_at":"2016-02-25T01:33:58Z","pushed_at":"2016-03-14T10:47:10Z","git_url":"git://github.com/projectatomic/openshift2nulecule.git","ssh_url":"git@github.com:projectatomic/openshift2nulecule.git","clone_url":"https://github.com/projectatomic/openshift2nulecule.git","svn_url":"https://github.com/projectatomic/openshift2nulecule","homepage":null,"size":71,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30"},"html":{"href":"https://github.com/projectatomic/openshift2nulecule/pull/30"},"issue":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/30"},"comments":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/openshift2nulecule/statuses/787986c6a9945b6719528272711858c5ba876b70"}}}}