{"action":"created","comment":{"url":"https://api.github.com/repos/systemslab/popper/pulls/comments/263243776","pull_request_review_id":211565317,"id":263243776,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MzI0Mzc3Ng==","diff_hunk":"@@ -53,6 +55,61 @@ def __init__(self, wfile, workspace):\n         for e in dict(self.env):\n             self.env.update({e.replace('GITHUB_', 'POPPER_'): self.env[e]})\n \n+    def validate(self):\n+        \"\"\"\n+        Validates the .workflow file\n+        \"\"\"\n+        if not self.wf.get('workflow', None):\n+            pu.fail('Workflow block must be present\\n')\n+        for _, wf_block in dict(self.wf['workflow']).items():\n+            if not wf_block.get('resolves', None):\n+                pu.fail('[resolves] attribute must be present\\n')\n+            else:\n+                if not isinstance(\n+                        wf_block['resolves'],\n+                        str) and not isinstance(\n+                        wf_block['resolves'],\n+                        list):\n+                    pu.fail('[resolves] attribute must be string or list\\n')\n+            if wf_block.get('on', None):\n+                if not isinstance(wf_block['on'], str):\n+                    pu.fail('[on] attribute must be a string\\n')\n+        if not self.wf.get('action', None):\n+            pu.fail('Action block must be present\\n')\n+        for a_name, a_block in self.wf['action'].items():\n+            if not a_block.get('uses', None):\n+                pu.fail('[uses] attribute must be present\\n')\n+            else:\n+                if not isinstance(a_block['uses'], str):\n+                    pu.fail('[uses] block must be a string\\n')\n+            if a_block.get('needs', None):\n+                if not isinstance(\n+                        a_block['needs'],\n+                        str) and not isinstance(\n+                        a_block['needs'],\n+                        list):\n+                    pu.fail('[needs] attribute must be a list or string\\n')\n+            if a_block.get('runs', None):\n+                if not isinstance(\n+                        a_block['runs'],\n+                        str) and not isinstance(\n+                        a_block['runs'],\n+                        list):\n+                    pu.fail('[runs] attribute must be a list or string\\n')\n+            if a_block.get('args', None):\n+                if not isinstance(","path":"cli/popper/gha.py","position":62,"original_position":62,"commit_id":"fc46a3122f6a152a2b0298b5d8835b547456d8ee","original_commit_id":"fc46a3122f6a152a2b0298b5d8835b547456d8ee","user":{"login":"ivotron","id":473117,"node_id":"MDQ6VXNlcjQ3MzExNw==","avatar_url":"https://avatars2.githubusercontent.com/u/473117?v=4","gravatar_id":"","url":"https://api.github.com/users/ivotron","html_url":"https://github.com/ivotron","followers_url":"https://api.github.com/users/ivotron/followers","following_url":"https://api.github.com/users/ivotron/following{/other_user}","gists_url":"https://api.github.com/users/ivotron/gists{/gist_id}","starred_url":"https://api.github.com/users/ivotron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivotron/subscriptions","organizations_url":"https://api.github.com/users/ivotron/orgs","repos_url":"https://api.github.com/users/ivotron/repos","events_url":"https://api.github.com/users/ivotron/events{/privacy}","received_events_url":"https://api.github.com/users/ivotron/received_events","type":"User","site_admin":false},"body":"move to `normalize()`","created_at":"2019-03-07T05:38:25Z","updated_at":"2019-03-07T05:39:17Z","html_url":"https://github.com/systemslab/popper/pull/529#discussion_r263243776","pull_request_url":"https://api.github.com/repos/systemslab/popper/pulls/529","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/systemslab/popper/pulls/comments/263243776"},"html":{"href":"https://github.com/systemslab/popper/pull/529#discussion_r263243776"},"pull_request":{"href":"https://api.github.com/repos/systemslab/popper/pulls/529"}}},"pull_request":{"url":"https://api.github.com/repos/systemslab/popper/pulls/529","id":258835543,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU4ODM1NTQz","html_url":"https://github.com/systemslab/popper/pull/529","diff_url":"https://github.com/systemslab/popper/pull/529.diff","patch_url":"https://github.com/systemslab/popper/pull/529.patch","issue_url":"https://api.github.com/repos/systemslab/popper/issues/529","number":529,"state":"open","locked":false,"title":"Fixes validation of .workflow","user":{"login":"JayjeetAtGithub","id":33978990,"node_id":"MDQ6VXNlcjMzOTc4OTkw","avatar_url":"https://avatars0.githubusercontent.com/u/33978990?v=4","gravatar_id":"","url":"https://api.github.com/users/JayjeetAtGithub","html_url":"https://github.com/JayjeetAtGithub","followers_url":"https://api.github.com/users/JayjeetAtGithub/followers","following_url":"https://api.github.com/users/JayjeetAtGithub/following{/other_user}","gists_url":"https://api.github.com/users/JayjeetAtGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/JayjeetAtGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JayjeetAtGithub/subscriptions","organizations_url":"https://api.github.com/users/JayjeetAtGithub/orgs","repos_url":"https://api.github.com/users/JayjeetAtGithub/repos","events_url":"https://api.github.com/users/JayjeetAtGithub/events{/privacy}","received_events_url":"https://api.github.com/users/JayjeetAtGithub/received_events","type":"User","site_admin":false},"body":"Adds validation rules for `.workflow` files","created_at":"2019-03-06T18:44:20Z","updated_at":"2019-03-07T05:39:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9d48338b687af6f768f799c7dadcc322eff3b6a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/systemslab/popper/pulls/529/commits","review_comments_url":"https://api.github.com/repos/systemslab/popper/pulls/529/comments","review_comment_url":"https://api.github.com/repos/systemslab/popper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemslab/popper/issues/529/comments","statuses_url":"https://api.github.com/repos/systemslab/popper/statuses/fc46a3122f6a152a2b0298b5d8835b547456d8ee","head":{"label":"JayjeetAtGithub:jayjeet/workflow-validation-fixes","ref":"jayjeet/workflow-validation-fixes","sha":"fc46a3122f6a152a2b0298b5d8835b547456d8ee","user":{"login":"JayjeetAtGithub","id":33978990,"node_id":"MDQ6VXNlcjMzOTc4OTkw","avatar_url":"https://avatars0.githubusercontent.com/u/33978990?v=4","gravatar_id":"","url":"https://api.github.com/users/JayjeetAtGithub","html_url":"https://github.com/JayjeetAtGithub","followers_url":"https://api.github.com/users/JayjeetAtGithub/followers","following_url":"https://api.github.com/users/JayjeetAtGithub/following{/other_user}","gists_url":"https://api.github.com/users/JayjeetAtGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/JayjeetAtGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JayjeetAtGithub/subscriptions","organizations_url":"https://api.github.com/users/JayjeetAtGithub/orgs","repos_url":"https://api.github.com/users/JayjeetAtGithub/repos","events_url":"https://api.github.com/users/JayjeetAtGithub/events{/privacy}","received_events_url":"https://api.github.com/users/JayjeetAtGithub/received_events","type":"User","site_admin":false},"repo":{"id":174077184,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQwNzcxODQ=","name":"popper","full_name":"JayjeetAtGithub/popper","private":false,"owner":{"login":"JayjeetAtGithub","id":33978990,"node_id":"MDQ6VXNlcjMzOTc4OTkw","avatar_url":"https://avatars0.githubusercontent.com/u/33978990?v=4","gravatar_id":"","url":"https://api.github.com/users/JayjeetAtGithub","html_url":"https://github.com/JayjeetAtGithub","followers_url":"https://api.github.com/users/JayjeetAtGithub/followers","following_url":"https://api.github.com/users/JayjeetAtGithub/following{/other_user}","gists_url":"https://api.github.com/users/JayjeetAtGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/JayjeetAtGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JayjeetAtGithub/subscriptions","organizations_url":"https://api.github.com/users/JayjeetAtGithub/orgs","repos_url":"https://api.github.com/users/JayjeetAtGithub/repos","events_url":"https://api.github.com/users/JayjeetAtGithub/events{/privacy}","received_events_url":"https://api.github.com/users/JayjeetAtGithub/received_events","type":"User","site_admin":false},"html_url":"https://github.com/JayjeetAtGithub/popper","description":"Github actions runner in Python (with some useful extensions!)","fork":true,"url":"https://api.github.com/repos/JayjeetAtGithub/popper","forks_url":"https://api.github.com/repos/JayjeetAtGithub/popper/forks","keys_url":"https://api.github.com/repos/JayjeetAtGithub/popper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JayjeetAtGithub/popper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JayjeetAtGithub/popper/teams","hooks_url":"https://api.github.com/repos/JayjeetAtGithub/popper/hooks","issue_events_url":"https://api.github.com/repos/JayjeetAtGithub/popper/issues/events{/number}","events_url":"https://api.github.com/repos/JayjeetAtGithub/popper/events","assignees_url":"https://api.github.com/repos/JayjeetAtGithub/popper/assignees{/user}","branches_url":"https://api.github.com/repos/JayjeetAtGithub/popper/branches{/branch}","tags_url":"https://api.github.com/repos/JayjeetAtGithub/popper/tags","blobs_url":"https://api.github.com/repos/JayjeetAtGithub/popper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JayjeetAtGithub/popper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JayjeetAtGithub/popper/git/refs{/sha}","trees_url":"https://api.github.com/repos/JayjeetAtGithub/popper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JayjeetAtGithub/popper/statuses/{sha}","languages_url":"https://api.github.com/repos/JayjeetAtGithub/popper/languages","stargazers_url":"https://api.github.com/repos/JayjeetAtGithub/popper/stargazers","contributors_url":"https://api.github.com/repos/JayjeetAtGithub/popper/contributors","subscribers_url":"https://api.github.com/repos/JayjeetAtGithub/popper/subscribers","subscription_url":"https://api.github.com/repos/JayjeetAtGithub/popper/subscription","commits_url":"https://api.github.com/repos/JayjeetAtGithub/popper/commits{/sha}","git_commits_url":"https://api.github.com/repos/JayjeetAtGithub/popper/git/commits{/sha}","comments_url":"https://api.github.com/repos/JayjeetAtGithub/popper/comments{/number}","issue_comment_url":"https://api.github.com/repos/JayjeetAtGithub/popper/issues/comments{/number}","contents_url":"https://api.github.com/repos/JayjeetAtGithub/popper/contents/{+path}","compare_url":"https://api.github.com/repos/JayjeetAtGithub/popper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JayjeetAtGithub/popper/merges","archive_url":"https://api.github.com/repos/JayjeetAtGithub/popper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JayjeetAtGithub/popper/downloads","issues_url":"https://api.github.com/repos/JayjeetAtGithub/popper/issues{/number}","pulls_url":"https://api.github.com/repos/JayjeetAtGithub/popper/pulls{/number}","milestones_url":"https://api.github.com/repos/JayjeetAtGithub/popper/milestones{/number}","notifications_url":"https://api.github.com/repos/JayjeetAtGithub/popper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JayjeetAtGithub/popper/labels{/name}","releases_url":"https://api.github.com/repos/JayjeetAtGithub/popper/releases{/id}","deployments_url":"https://api.github.com/repos/JayjeetAtGithub/popper/deployments","created_at":"2019-03-06T05:24:07Z","updated_at":"2019-03-06T07:58:45Z","pushed_at":"2019-03-06T18:46:54Z","git_url":"git://github.com/JayjeetAtGithub/popper.git","ssh_url":"git@github.com:JayjeetAtGithub/popper.git","clone_url":"https://github.com/JayjeetAtGithub/popper.git","svn_url":"https://github.com/JayjeetAtGithub/popper","homepage":"","size":23830,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"systemslab:master","ref":"master","sha":"c1a357b7aa8b748bb9eca921de2c38101ee19afe","user":{"login":"systemslab","id":3520814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjA4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3520814?v=4","gravatar_id":"","url":"https://api.github.com/users/systemslab","html_url":"https://github.com/systemslab","followers_url":"https://api.github.com/users/systemslab/followers","following_url":"https://api.github.com/users/systemslab/following{/other_user}","gists_url":"https://api.github.com/users/systemslab/gists{/gist_id}","starred_url":"https://api.github.com/users/systemslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemslab/subscriptions","organizations_url":"https://api.github.com/users/systemslab/orgs","repos_url":"https://api.github.com/users/systemslab/repos","events_url":"https://api.github.com/users/systemslab/events{/privacy}","received_events_url":"https://api.github.com/users/systemslab/received_events","type":"Organization","site_admin":false},"repo":{"id":43576029,"node_id":"MDEwOlJlcG9zaXRvcnk0MzU3NjAyOQ==","name":"popper","full_name":"systemslab/popper","private":false,"owner":{"login":"systemslab","id":3520814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjA4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3520814?v=4","gravatar_id":"","url":"https://api.github.com/users/systemslab","html_url":"https://github.com/systemslab","followers_url":"https://api.github.com/users/systemslab/followers","following_url":"https://api.github.com/users/systemslab/following{/other_user}","gists_url":"https://api.github.com/users/systemslab/gists{/gist_id}","starred_url":"https://api.github.com/users/systemslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemslab/subscriptions","organizations_url":"https://api.github.com/users/systemslab/orgs","repos_url":"https://api.github.com/users/systemslab/repos","events_url":"https://api.github.com/users/systemslab/events{/privacy}","received_events_url":"https://api.github.com/users/systemslab/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/systemslab/popper","description":"Github actions runner in Python (with some useful extensions!)","fork":false,"url":"https://api.github.com/repos/systemslab/popper","forks_url":"https://api.github.com/repos/systemslab/popper/forks","keys_url":"https://api.github.com/repos/systemslab/popper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemslab/popper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemslab/popper/teams","hooks_url":"https://api.github.com/repos/systemslab/popper/hooks","issue_events_url":"https://api.github.com/repos/systemslab/popper/issues/events{/number}","events_url":"https://api.github.com/repos/systemslab/popper/events","assignees_url":"https://api.github.com/repos/systemslab/popper/assignees{/user}","branches_url":"https://api.github.com/repos/systemslab/popper/branches{/branch}","tags_url":"https://api.github.com/repos/systemslab/popper/tags","blobs_url":"https://api.github.com/repos/systemslab/popper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemslab/popper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemslab/popper/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemslab/popper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemslab/popper/statuses/{sha}","languages_url":"https://api.github.com/repos/systemslab/popper/languages","stargazers_url":"https://api.github.com/repos/systemslab/popper/stargazers","contributors_url":"https://api.github.com/repos/systemslab/popper/contributors","subscribers_url":"https://api.github.com/repos/systemslab/popper/subscribers","subscription_url":"https://api.github.com/repos/systemslab/popper/subscription","commits_url":"https://api.github.com/repos/systemslab/popper/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemslab/popper/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemslab/popper/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemslab/popper/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemslab/popper/contents/{+path}","compare_url":"https://api.github.com/repos/systemslab/popper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemslab/popper/merges","archive_url":"https://api.github.com/repos/systemslab/popper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemslab/popper/downloads","issues_url":"https://api.github.com/repos/systemslab/popper/issues{/number}","pulls_url":"https://api.github.com/repos/systemslab/popper/pulls{/number}","milestones_url":"https://api.github.com/repos/systemslab/popper/milestones{/number}","notifications_url":"https://api.github.com/repos/systemslab/popper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemslab/popper/labels{/name}","releases_url":"https://api.github.com/repos/systemslab/popper/releases{/id}","deployments_url":"https://api.github.com/repos/systemslab/popper/deployments","created_at":"2015-10-02T20:58:39Z","updated_at":"2019-03-07T00:30:45Z","pushed_at":"2019-03-07T00:54:11Z","git_url":"git://github.com/systemslab/popper.git","ssh_url":"git@github.com:systemslab/popper.git","clone_url":"https://github.com/systemslab/popper.git","svn_url":"https://github.com/systemslab/popper","homepage":"","size":23823,"stargazers_count":77,"watchers_count":77,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":21,"open_issues":52,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemslab/popper/pulls/529"},"html":{"href":"https://github.com/systemslab/popper/pull/529"},"issue":{"href":"https://api.github.com/repos/systemslab/popper/issues/529"},"comments":{"href":"https://api.github.com/repos/systemslab/popper/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/systemslab/popper/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/systemslab/popper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemslab/popper/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/systemslab/popper/statuses/fc46a3122f6a152a2b0298b5d8835b547456d8ee"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ivotron"}}