{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/211014666","pull_request_review_id":147358141,"id":211014666,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTAxNDY2Ng==","diff_hunk":"@@ -0,0 +1,28 @@\n+def with_event_types\n+  EventStream.event_groups.each do |group_name, group_data|\n+    EventStream::GROUP_LEVELS.each do |level|\n+      group_data[level]&.each { |typ| yield(group_name, level, typ) }\n+    end\n+  end\n+end","path":"spec/models/event_stream_spec.rb","position":7,"original_position":7,"commit_id":"787ee6961cd806f9e68c7e493c99cb84b5d18b4d","original_commit_id":"787ee6961cd806f9e68c7e493c99cb84b5d18b4d","user":{"login":"bdunne","id":651659,"node_id":"MDQ6VXNlcjY1MTY1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/651659?v=4","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false},"body":"We do something like [this](https://github.com/ManageIQ/manageiq/blob/master/spec/models/miq_provision_workflow_spec.rb#L101-L105) in many places if that's what you mean.  :+1: I agree with not polluting the global namespace.","created_at":"2018-08-17T19:44:11Z","updated_at":"2018-08-17T19:44:11Z","html_url":"https://github.com/ManageIQ/manageiq/pull/17867#discussion_r211014666","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/211014666"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/17867#discussion_r211014666"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867"}},"in_reply_to_id":210697673},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867","id":208681568,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NjgxNTY4","html_url":"https://github.com/ManageIQ/manageiq/pull/17867","diff_url":"https://github.com/ManageIQ/manageiq/pull/17867.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/17867.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17867","number":17867,"state":"open","locked":false,"title":"Add tests for event type mapping","user":{"login":"tadeboro","id":70951,"node_id":"MDQ6VXNlcjcwOTUx","avatar_url":"https://avatars3.githubusercontent.com/u/70951?v=4","gravatar_id":"","url":"https://api.github.com/users/tadeboro","html_url":"https://github.com/tadeboro","followers_url":"https://api.github.com/users/tadeboro/followers","following_url":"https://api.github.com/users/tadeboro/following{/other_user}","gists_url":"https://api.github.com/users/tadeboro/gists{/gist_id}","starred_url":"https://api.github.com/users/tadeboro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadeboro/subscriptions","organizations_url":"https://api.github.com/users/tadeboro/orgs","repos_url":"https://api.github.com/users/tadeboro/repos","events_url":"https://api.github.com/users/tadeboro/events{/privacy}","received_events_url":"https://api.github.com/users/tadeboro/received_events","type":"User","site_admin":false},"body":"Test try to ensure that event type mappings are valid by checking that:\r\n\r\n 1. all event types specifications are either strings or regexes,\r\n 2. regexes can be used by PostgreSQL and\r\n 3. regexes do not use unsupported options.\r\n\r\nIn order to give as much information about the failures to developers as possible, we check each event type in separate `it` block, labeling it with path in the settings file (group name, level and value of type being checked).","created_at":"2018-08-15T21:06:13Z","updated_at":"2018-08-17T19:44:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c14b3980ca01f26a6c4e900b13945c4f899cd85b","assignee":{"login":"Fryguy","id":52120,"node_id":"MDQ6VXNlcjUyMTIw","avatar_url":"https://avatars3.githubusercontent.com/u/52120?v=4","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"assignees":[{"login":"Fryguy","id":52120,"node_id":"MDQ6VXNlcjUyMTIw","avatar_url":"https://avatars3.githubusercontent.com/u/52120?v=4","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17867/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/787ee6961cd806f9e68c7e493c99cb84b5d18b4d","head":{"label":"xlab-si:event-type-regex-validation","ref":"event-type-regex-validation","sha":"787ee6961cd806f9e68c7e493c99cb84b5d18b4d","user":{"login":"xlab-si","id":17640165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQwMTY1","avatar_url":"https://avatars2.githubusercontent.com/u/17640165?v=4","gravatar_id":"","url":"https://api.github.com/users/xlab-si","html_url":"https://github.com/xlab-si","followers_url":"https://api.github.com/users/xlab-si/followers","following_url":"https://api.github.com/users/xlab-si/following{/other_user}","gists_url":"https://api.github.com/users/xlab-si/gists{/gist_id}","starred_url":"https://api.github.com/users/xlab-si/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlab-si/subscriptions","organizations_url":"https://api.github.com/users/xlab-si/orgs","repos_url":"https://api.github.com/users/xlab-si/repos","events_url":"https://api.github.com/users/xlab-si/events{/privacy}","received_events_url":"https://api.github.com/users/xlab-si/received_events","type":"Organization","site_admin":false},"repo":{"id":53126087,"node_id":"MDEwOlJlcG9zaXRvcnk1MzEyNjA4Nw==","name":"manageiq","full_name":"xlab-si/manageiq","owner":{"login":"xlab-si","id":17640165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQwMTY1","avatar_url":"https://avatars2.githubusercontent.com/u/17640165?v=4","gravatar_id":"","url":"https://api.github.com/users/xlab-si","html_url":"https://github.com/xlab-si","followers_url":"https://api.github.com/users/xlab-si/followers","following_url":"https://api.github.com/users/xlab-si/following{/other_user}","gists_url":"https://api.github.com/users/xlab-si/gists{/gist_id}","starred_url":"https://api.github.com/users/xlab-si/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlab-si/subscriptions","organizations_url":"https://api.github.com/users/xlab-si/orgs","repos_url":"https://api.github.com/users/xlab-si/repos","events_url":"https://api.github.com/users/xlab-si/events{/privacy}","received_events_url":"https://api.github.com/users/xlab-si/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xlab-si/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/xlab-si/manageiq","forks_url":"https://api.github.com/repos/xlab-si/manageiq/forks","keys_url":"https://api.github.com/repos/xlab-si/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xlab-si/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xlab-si/manageiq/teams","hooks_url":"https://api.github.com/repos/xlab-si/manageiq/hooks","issue_events_url":"https://api.github.com/repos/xlab-si/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/xlab-si/manageiq/events","assignees_url":"https://api.github.com/repos/xlab-si/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/xlab-si/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/xlab-si/manageiq/tags","blobs_url":"https://api.github.com/repos/xlab-si/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xlab-si/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xlab-si/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/xlab-si/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xlab-si/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/xlab-si/manageiq/languages","stargazers_url":"https://api.github.com/repos/xlab-si/manageiq/stargazers","contributors_url":"https://api.github.com/repos/xlab-si/manageiq/contributors","subscribers_url":"https://api.github.com/repos/xlab-si/manageiq/subscribers","subscription_url":"https://api.github.com/repos/xlab-si/manageiq/subscription","commits_url":"https://api.github.com/repos/xlab-si/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/xlab-si/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/xlab-si/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/xlab-si/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/xlab-si/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/xlab-si/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xlab-si/manageiq/merges","archive_url":"https://api.github.com/repos/xlab-si/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xlab-si/manageiq/downloads","issues_url":"https://api.github.com/repos/xlab-si/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/xlab-si/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/xlab-si/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/xlab-si/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xlab-si/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/xlab-si/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/xlab-si/manageiq/deployments","created_at":"2016-03-04T10:03:29Z","updated_at":"2018-08-06T16:28:51Z","pushed_at":"2018-08-15T21:04:57Z","git_url":"git://github.com/xlab-si/manageiq.git","ssh_url":"git@github.com:xlab-si/manageiq.git","clone_url":"https://github.com/xlab-si/manageiq.git","svn_url":"https://github.com/xlab-si/manageiq","homepage":"manageiq.org","size":211359,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"5c2042287971959acaaa0c868d8b31ccd5e412df","user":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"node_id":"MDEwOlJlcG9zaXRvcnkyMDc4OTc1Nw==","name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Open-Source Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2018-08-17T14:27:54Z","pushed_at":"2018-08-17T19:39:39Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":255874,"stargazers_count":689,"watchers_count":689,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":652,"mirror_url":null,"archived":false,"open_issues_count":604,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":652,"open_issues":604,"watchers":689,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/17867"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/17867"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/17867/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17867/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/787ee6961cd806f9e68c7e493c99cb84b5d18b4d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bdunne"}}