{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapcraft/pulls/comments/73182691","id":73182691,"diff_hunk":"@@ -115,8 +124,25 @@ def _update_after_parts(partname, after_parts):\n \n def _get_origin_data(origin_dir):\n     origin_data = {}\n+    snapcraft_yaml_file = os.path.join(origin_dir, 'snapcraft.yaml')\n+    hidden_snapcraft_yaml_file = os.path.join(origin_dir, '.snapcraft.yaml')\n+\n+    # read either 'snapcraft.yaml' or '.snapcraft.yaml' but not both\n+    if not os.path.exists(snapcraft_yaml_file) and not os.path.exists(\n+            hidden_snapcraft_yaml_file):\n+        raise MissingSnapcraftYAMLError()\n+\n+    if os.path.exists(snapcraft_yaml_file):\n+        if os.path.exists(hidden_snapcraft_yaml_file):\n+            raise BadSnapcraftYAMLError(\n+                'Origin has both \"snapcraft.yaml\" and \".snapcraft.yaml\"')\n+        else:\n+            yaml_file = snapcraft_yaml_file\n+    elif os.path.exists(hidden_snapcraft_yaml_file):\n+        yaml_file = hidden_snapcraft_yaml_file\n+\n     try:\n-        with open(os.path.join(origin_dir, 'snapcraft.yaml'), \"r\") as fp:\n+        with open(yaml_file, \"r\") as fp:","path":"snapcraft/internal/parser.py","position":null,"original_position":46,"commit_id":"7ec42ff2c74bb6513161aa634b696bd61fd89ab1","original_commit_id":"bf860bfdb259b75477653c3d57ae4251ef5ed0b8","user":{"login":"josepht","id":646088,"avatar_url":"https://avatars.githubusercontent.com/u/646088?v=3","gravatar_id":"","url":"https://api.github.com/users/josepht","html_url":"https://github.com/josepht","followers_url":"https://api.github.com/users/josepht/followers","following_url":"https://api.github.com/users/josepht/following{/other_user}","gists_url":"https://api.github.com/users/josepht/gists{/gist_id}","starred_url":"https://api.github.com/users/josepht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepht/subscriptions","organizations_url":"https://api.github.com/users/josepht/orgs","repos_url":"https://api.github.com/users/josepht/repos","events_url":"https://api.github.com/users/josepht/events{/privacy}","received_events_url":"https://api.github.com/users/josepht/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2016-08-02T15:50:00Z","updated_at":"2016-08-02T15:50:00Z","html_url":"https://github.com/snapcore/snapcraft/pull/618#discussion_r73182691","pull_request_url":"https://api.github.com/repos/snapcore/snapcraft/pulls/618","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/comments/73182691"},"html":{"href":"https://github.com/snapcore/snapcraft/pull/618#discussion_r73182691"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/618"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapcraft/pulls/618","id":75719297,"html_url":"https://github.com/snapcore/snapcraft/pull/618","diff_url":"https://github.com/snapcore/snapcraft/pull/618.diff","patch_url":"https://github.com/snapcore/snapcraft/pull/618.patch","issue_url":"https://api.github.com/repos/snapcore/snapcraft/issues/618","number":618,"state":"open","locked":false,"title":"parser - Support .snapcraft.yaml files.","user":{"login":"josepht","id":646088,"avatar_url":"https://avatars.githubusercontent.com/u/646088?v=3","gravatar_id":"","url":"https://api.github.com/users/josepht","html_url":"https://github.com/josepht","followers_url":"https://api.github.com/users/josepht/followers","following_url":"https://api.github.com/users/josepht/following{/other_user}","gists_url":"https://api.github.com/users/josepht/gists{/gist_id}","starred_url":"https://api.github.com/users/josepht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepht/subscriptions","organizations_url":"https://api.github.com/users/josepht/orgs","repos_url":"https://api.github.com/users/josepht/repos","events_url":"https://api.github.com/users/josepht/events{/privacy}","received_events_url":"https://api.github.com/users/josepht/received_events","type":"User","site_admin":false},"body":"When getting origin data use either snapcraft.yaml or .snapcraft.yaml.\r\nError if both or neither are present.\r\n\r\nLP:#1597484\r\nLP:#1597778\r\n\r\nSigned-off-by: Joe Talbott <joe.talbott@ubuntu.com>","created_at":"2016-06-29T20:51:56Z","updated_at":"2016-08-02T15:50:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7d05dccee9690c676c966bf23dd85172e2a301c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapcraft/pulls/618/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapcraft/pulls/618/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapcraft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapcraft/issues/618/comments","statuses_url":"https://api.github.com/repos/snapcore/snapcraft/statuses/7ec42ff2c74bb6513161aa634b696bd61fd89ab1","head":{"label":"josepht:bugs/1597484","ref":"bugs/1597484","sha":"7ec42ff2c74bb6513161aa634b696bd61fd89ab1","user":{"login":"josepht","id":646088,"avatar_url":"https://avatars.githubusercontent.com/u/646088?v=3","gravatar_id":"","url":"https://api.github.com/users/josepht","html_url":"https://github.com/josepht","followers_url":"https://api.github.com/users/josepht/followers","following_url":"https://api.github.com/users/josepht/following{/other_user}","gists_url":"https://api.github.com/users/josepht/gists{/gist_id}","starred_url":"https://api.github.com/users/josepht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepht/subscriptions","organizations_url":"https://api.github.com/users/josepht/orgs","repos_url":"https://api.github.com/users/josepht/repos","events_url":"https://api.github.com/users/josepht/events{/privacy}","received_events_url":"https://api.github.com/users/josepht/received_events","type":"User","site_admin":false},"repo":{"id":54208156,"name":"snapcraft","full_name":"josepht/snapcraft","owner":{"login":"josepht","id":646088,"avatar_url":"https://avatars.githubusercontent.com/u/646088?v=3","gravatar_id":"","url":"https://api.github.com/users/josepht","html_url":"https://github.com/josepht","followers_url":"https://api.github.com/users/josepht/followers","following_url":"https://api.github.com/users/josepht/following{/other_user}","gists_url":"https://api.github.com/users/josepht/gists{/gist_id}","starred_url":"https://api.github.com/users/josepht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepht/subscriptions","organizations_url":"https://api.github.com/users/josepht/orgs","repos_url":"https://api.github.com/users/josepht/repos","events_url":"https://api.github.com/users/josepht/events{/privacy}","received_events_url":"https://api.github.com/users/josepht/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josepht/snapcraft","description":"Snapcraft is a delightful packaging tool","fork":true,"url":"https://api.github.com/repos/josepht/snapcraft","forks_url":"https://api.github.com/repos/josepht/snapcraft/forks","keys_url":"https://api.github.com/repos/josepht/snapcraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josepht/snapcraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josepht/snapcraft/teams","hooks_url":"https://api.github.com/repos/josepht/snapcraft/hooks","issue_events_url":"https://api.github.com/repos/josepht/snapcraft/issues/events{/number}","events_url":"https://api.github.com/repos/josepht/snapcraft/events","assignees_url":"https://api.github.com/repos/josepht/snapcraft/assignees{/user}","branches_url":"https://api.github.com/repos/josepht/snapcraft/branches{/branch}","tags_url":"https://api.github.com/repos/josepht/snapcraft/tags","blobs_url":"https://api.github.com/repos/josepht/snapcraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josepht/snapcraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josepht/snapcraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/josepht/snapcraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josepht/snapcraft/statuses/{sha}","languages_url":"https://api.github.com/repos/josepht/snapcraft/languages","stargazers_url":"https://api.github.com/repos/josepht/snapcraft/stargazers","contributors_url":"https://api.github.com/repos/josepht/snapcraft/contributors","subscribers_url":"https://api.github.com/repos/josepht/snapcraft/subscribers","subscription_url":"https://api.github.com/repos/josepht/snapcraft/subscription","commits_url":"https://api.github.com/repos/josepht/snapcraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/josepht/snapcraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/josepht/snapcraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/josepht/snapcraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/josepht/snapcraft/contents/{+path}","compare_url":"https://api.github.com/repos/josepht/snapcraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josepht/snapcraft/merges","archive_url":"https://api.github.com/repos/josepht/snapcraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josepht/snapcraft/downloads","issues_url":"https://api.github.com/repos/josepht/snapcraft/issues{/number}","pulls_url":"https://api.github.com/repos/josepht/snapcraft/pulls{/number}","milestones_url":"https://api.github.com/repos/josepht/snapcraft/milestones{/number}","notifications_url":"https://api.github.com/repos/josepht/snapcraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josepht/snapcraft/labels{/name}","releases_url":"https://api.github.com/repos/josepht/snapcraft/releases{/id}","deployments_url":"https://api.github.com/repos/josepht/snapcraft/deployments","created_at":"2016-03-18T14:39:09Z","updated_at":"2016-03-18T14:39:10Z","pushed_at":"2016-08-02T15:49:44Z","git_url":"git://github.com/josepht/snapcraft.git","ssh_url":"git@github.com:josepht/snapcraft.git","clone_url":"https://github.com/josepht/snapcraft.git","svn_url":"https://github.com/josepht/snapcraft","homepage":null,"size":4533,"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":"snapcore:master","ref":"master","sha":"8bf22c2a12bf58f077e219caa14256b3884811b3","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":45199136,"name":"snapcraft","full_name":"snapcore/snapcraft","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapcraft","description":"Snapcraft is a delightful packaging tool","fork":false,"url":"https://api.github.com/repos/snapcore/snapcraft","forks_url":"https://api.github.com/repos/snapcore/snapcraft/forks","keys_url":"https://api.github.com/repos/snapcore/snapcraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapcraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapcraft/teams","hooks_url":"https://api.github.com/repos/snapcore/snapcraft/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapcraft/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapcraft/events","assignees_url":"https://api.github.com/repos/snapcore/snapcraft/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapcraft/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapcraft/tags","blobs_url":"https://api.github.com/repos/snapcore/snapcraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapcraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapcraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapcraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapcraft/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapcraft/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapcraft/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapcraft/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapcraft/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapcraft/subscription","commits_url":"https://api.github.com/repos/snapcore/snapcraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapcraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapcraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapcraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapcraft/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapcraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapcraft/merges","archive_url":"https://api.github.com/repos/snapcore/snapcraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapcraft/downloads","issues_url":"https://api.github.com/repos/snapcore/snapcraft/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapcraft/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapcraft/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapcraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapcraft/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapcraft/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapcraft/deployments","created_at":"2015-10-29T17:23:15Z","updated_at":"2016-08-02T03:25:02Z","pushed_at":"2016-08-02T15:49:45Z","git_url":"git://github.com/snapcore/snapcraft.git","ssh_url":"git@github.com:snapcore/snapcraft.git","clone_url":"https://github.com/snapcore/snapcraft.git","svn_url":"https://github.com/snapcore/snapcraft","homepage":null,"size":6509,"stargazers_count":194,"watchers_count":194,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":37,"forks":97,"open_issues":37,"watchers":194,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/618"},"html":{"href":"https://github.com/snapcore/snapcraft/pull/618"},"issue":{"href":"https://api.github.com/repos/snapcore/snapcraft/issues/618"},"comments":{"href":"https://api.github.com/repos/snapcore/snapcraft/issues/618/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/618/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapcraft/pulls/618/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapcraft/statuses/7ec42ff2c74bb6513161aa634b696bd61fd89ab1"}}}}
{"actor":{"display_login":"josepht"}}