{"action":"created","issue":{"url":"https://api.github.com/repos/wikimedia/change-propagation/issues/10","repository_url":"https://api.github.com/repos/wikimedia/change-propagation","labels_url":"https://api.github.com/repos/wikimedia/change-propagation/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/wikimedia/change-propagation/issues/10/comments","events_url":"https://api.github.com/repos/wikimedia/change-propagation/issues/10/events","html_url":"https://github.com/wikimedia/change-propagation/pull/10","id":151419975,"number":10,"title":"Rules: Add the `match_not` predicate (release v0.2.0)","user":{"login":"d00rman","id":10210173,"avatar_url":"https://avatars.githubusercontent.com/u/10210173?v=3","gravatar_id":"","url":"https://api.github.com/users/d00rman","html_url":"https://github.com/d00rman","followers_url":"https://api.github.com/users/d00rman/followers","following_url":"https://api.github.com/users/d00rman/following{/other_user}","gists_url":"https://api.github.com/users/d00rman/gists{/gist_id}","starred_url":"https://api.github.com/users/d00rman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d00rman/subscriptions","organizations_url":"https://api.github.com/users/d00rman/orgs","repos_url":"https://api.github.com/users/d00rman/repos","events_url":"https://api.github.com/users/d00rman/events{/privacy}","received_events_url":"https://api.github.com/users/d00rman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-27T15:46:58Z","updated_at":"2016-04-27T18:06:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wikimedia/change-propagation/pulls/10","html_url":"https://github.com/wikimedia/change-propagation/pull/10","diff_url":"https://github.com/wikimedia/change-propagation/pull/10.diff","patch_url":"https://github.com/wikimedia/change-propagation/pull/10.patch"},"body":"There are situations where we might need to negate the outcome of a rule match test. One such example is updating the summary endpoint for non-wiktionaries. This PR adds the functionality via the `match_not` predicate. If it is present, its condition is evaluated and negated and the message is accepted only if it doesn't match it. This works rather well in conjuction with the `match` predicate: if both are specified, they both need to be evaluated positively in order for the message to be accepted. Note that `match_not` is used only for testing messages, it cannot be used for rule execution expansion.\r\n\r\ncc @wikimedia/services "},"comment":{"url":"https://api.github.com/repos/wikimedia/change-propagation/issues/comments/215175140","html_url":"https://github.com/wikimedia/change-propagation/pull/10#issuecomment-215175140","issue_url":"https://api.github.com/repos/wikimedia/change-propagation/issues/10","id":215175140,"user":{"login":"d00rman","id":10210173,"avatar_url":"https://avatars.githubusercontent.com/u/10210173?v=3","gravatar_id":"","url":"https://api.github.com/users/d00rman","html_url":"https://github.com/d00rman","followers_url":"https://api.github.com/users/d00rman/followers","following_url":"https://api.github.com/users/d00rman/following{/other_user}","gists_url":"https://api.github.com/users/d00rman/gists{/gist_id}","starred_url":"https://api.github.com/users/d00rman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d00rman/subscriptions","organizations_url":"https://api.github.com/users/d00rman/orgs","repos_url":"https://api.github.com/users/d00rman/repos","events_url":"https://api.github.com/users/d00rman/events{/privacy}","received_events_url":"https://api.github.com/users/d00rman/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T18:06:10Z","updated_at":"2016-04-27T18:06:10Z","body":"> May be better `not_match`?\r\n\r\nI'm not really happy with `match_not` either, I was in a dilemma between `match_not` and `dont_match` but went for the former because it has a note of poetry in it while still being an imperative :)\r\n\r\n> I'm wondering how far we should push this custom match DSL, rather than supporting functions / expressions as in regular request handlers.\r\n\r\nI don't find `match_not` too sexy either, but I think it's more convenient than having functions / expressions for that (IMHO, it's more readable like this). But in general I agree that if start adding stuff like crazy to it. Maybe revisit this in the future if/when we find features that are needed but lacking?"}}