{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17772","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17772/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17772/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17772/events","html_url":"https://github.com/ManageIQ/manageiq/pull/17772","id":345555017,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjU2Nzg3","number":17772,"title":"Allow mapping event types to groups using regexes","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},"labels":[{"id":106615678,"node_id":"MDU6TGFiZWwxMDY2MTU2Nzg=","url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"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}],"milestone":null,"comments":4,"created_at":"2018-07-29T19:13:16Z","updated_at":"2018-08-08T08:36:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17772","html_url":"https://github.com/ManageIQ/manageiq/pull/17772","diff_url":"https://github.com/ManageIQ/manageiq/pull/17772.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/17772.patch"},"body":"Up until now, in order to associate an event type with an event group, we needed to spell out events full name in settings file under appropriate event group category and level.\r\n\r\nSome of the providers have hundreds of event types, which makes filling all this information in tedious and error prone. Not to mention that settings file is now one giant pile of event types.\r\n\r\nIn order to make process of registering event types scale a bit better, this commit adds support for registering a class of event types that match specified regular expressions. Simple example:\r\n\r\n    :ems:\r\n      :ems_dummy:\r\n        :event_handling:\r\n          :event_groups:\r\n            :addition:\r\n              :critical:\r\n              - dummy_event01_add\r\n              - dummy_event02_add\r\n              :detail:\r\n              - dummy_event03_add\r\n              - dummy_event04_add\r\n              ...\r\n              - dummy_event70_add\r\n              - dm_event_create\r\n\r\nThis can now be written as\r\n\r\n    :ems:\r\n      :ems_dummy:\r\n        :event_handling:\r\n          :event_groups:\r\n            :addition:\r\n              :critical:\r\n              - dummy_event01_add\r\n              - dummy_event02_add\r\n              :detail:\r\n              - dm_event_create\r\n              :detail_regex:\r\n              - ^dummy_[0-9]{2}_add$\r\n\r\nRegular expression support has been added to all levels, so if there exists a level `:lvl`, then `:lvl_regex` is also available.\r\n\r\nWe took a great deal of care not to break existing code, so non-regex event type mappings take precedence over regular expression matches. For example, in our sample above, `dummy_event_02_add` gets assigned critical level despite also matching detail regex.\r\n\r\nNote that if sets of event types that are matched by regular expressions are not disjoint, then there will be multiple valid event type mappings. In this case, event types that match more than one\r\ngroup and/or level get assigned an arbitrary one.\r\n\r\n@miq-bot assign @gtanzillo \r\n\r\n/cc @miha-plesko @agrare @gberginc "},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/411331123","html_url":"https://github.com/ManageIQ/manageiq/pull/17772#issuecomment-411331123","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17772","id":411331123,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTMzMTEyMw==","user":{"login":"miq-bot","id":7806257,"node_id":"MDQ6VXNlcjc4MDYyNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/7806257?v=4","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T08:36:46Z","updated_at":"2018-08-08T08:36:46Z","author_association":"MEMBER","body":"<rubocop />Checked commit https://github.com/xlab-si/manageiq/commit/3b3b07e678dec8e8c4c994922ea598038d8e97a0 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0\n2 files checked, 0 offenses detected\nEverything looks fine. :cake:\n"}}
{"actor":{"display_login":"miq-bot"}}