{"action":"created","issue":{"url":"https://api.github.com/repos/flapjack/flapjack/issues/793","labels_url":"https://api.github.com/repos/flapjack/flapjack/issues/793/labels{/name}","comments_url":"https://api.github.com/repos/flapjack/flapjack/issues/793/comments","events_url":"https://api.github.com/repos/flapjack/flapjack/issues/793/events","html_url":"https://github.com/flapjack/flapjack/issues/793","id":58025640,"number":793,"title":"chat bot syntax consistency around pattern matching","user":{"login":"jessereynolds","id":391439,"avatar_url":"https://avatars.githubusercontent.com/u/391439?v=3","gravatar_id":"","url":"https://api.github.com/users/jessereynolds","html_url":"https://github.com/jessereynolds","followers_url":"https://api.github.com/users/jessereynolds/followers","following_url":"https://api.github.com/users/jessereynolds/following{/other_user}","gists_url":"https://api.github.com/users/jessereynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/jessereynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessereynolds/subscriptions","organizations_url":"https://api.github.com/users/jessereynolds/orgs","repos_url":"https://api.github.com/users/jessereynolds/repos","events_url":"https://api.github.com/users/jessereynolds/events{/privacy}","received_events_url":"https://api.github.com/users/jessereynolds/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flapjack/flapjack/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/flapjack/flapjack/labels/XMPP","name":"XMPP","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-18T04:43:01Z","updated_at":"2015-02-18T04:44:55Z","closed_at":null,"body":"Some commands that allow a regex require the word `matching` to precede the regex, eg:\r\n\r\n```\r\n@flapjack find entities matching /^foo/\r\n@flapjack find checks matching /^HTTP / on entities matching /^foo/\r\n```\r\n\r\nSome do not, eg:\r\n\r\n```\r\n@flapjack ack checks /^HTTP / on /^foo/ Beatrice fix0ring duration: 30 minutes\r\n```\r\n\r\nWe should be consistent about this. How about we:\r\n- allow both (the preceding 'matching' becomes optional in all commands that take regexes)\r\n- allow 'entities' as an optional word where appropriate also eg ` on [entities] [matching] /<regex>/`\r\n- 'matching' is added to all regex commands in the help text\r\n\r\nThe following would need their help text updated:\r\n```\r\nack entities\r\nmaint entities\r\nstatus entities\r\nack checks\r\n```\r\n\r\nThe help text in 1.3.0:\r\n\r\n```\r\ncommands: \r\n  ACKID <id> <comment> [duration: <time spec>]\r\n  ack entities /pattern/ <comment> [duration: <time spec>]\r\n  maint entities /pattern/ <comment> [(start-in|start-at): <time spec>] [duration: <time spec>]\r\n  status entities /pattern/\r\n  ack checks /check_pattern/ on /entity_pattern/ <comment> [duration: <time spec>]\r\n  status checks /check_pattern/ on /entity_pattern/\r\n  find entities matching /pattern/\r\n  find checks[ matching /pattern/] on (<entity>|entities matching /pattern/)\r\n  test notifications for <entity>[:<check>]\r\n  tell me about <entity>[:<check>]\r\n  identify\r\n  help\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/flapjack/flapjack/issues/comments/74811361","html_url":"https://github.com/flapjack/flapjack/issues/793#issuecomment-74811361","issue_url":"https://api.github.com/repos/flapjack/flapjack/issues/793","id":74811361,"user":{"login":"ali-graham","id":2100374,"avatar_url":"https://avatars.githubusercontent.com/u/2100374?v=3","gravatar_id":"","url":"https://api.github.com/users/ali-graham","html_url":"https://github.com/ali-graham","followers_url":"https://api.github.com/users/ali-graham/followers","following_url":"https://api.github.com/users/ali-graham/following{/other_user}","gists_url":"https://api.github.com/users/ali-graham/gists{/gist_id}","starred_url":"https://api.github.com/users/ali-graham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ali-graham/subscriptions","organizations_url":"https://api.github.com/users/ali-graham/orgs","repos_url":"https://api.github.com/users/ali-graham/repos","events_url":"https://api.github.com/users/ali-graham/events{/privacy}","received_events_url":"https://api.github.com/users/ali-graham/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T04:44:55Z","updated_at":"2015-02-18T04:44:55Z","body":"The situation is better in master; https://github.com/flapjack/flapjack/blob/794ca24e7c79b90aa407d110ea0d846a59dbd2d9/lib/flapjack/gateways/jabber.rb#L264-L283 (also, loading of the check data is more sensible).\r\n"}}