Page MenuHomePhabricator

more flexibility in Herald rules
Closed, ResolvedPublic


I would like to track unreviewed commits against my master branch. An "unreviewed" commit is one that has neither a Phabricator Diff attached to it, nor the URL of our old code review tool in the commit message.

My rule currently looks like this

The solution to my problem would be if I inverted all the rules - has a Diff, has text in commitmsg, is on master - and then change When to NONE of the rules. This only fixes my specific case and I imagine I could easily find one not as easily fixable.

Alternatively, a more complex UI with nested AND/OR blocks, would solve any case that can be described with the offered verbs.

Event Timeline

... nvm. brain fart moment.

my rules work as expected. an audit was triggered by a someone submitting a diff that wasn't formally accepted.

You can use two rules:

  • This is the first rule, with no actions ("Do Nothing").
  • The second rule uses an "[ Another Herald rule ][ does not match: ][ Your First Rule ]" condition to actually trigger actions.

Does that solve your issue?

ah, chaining Herald rules, while clunky as a UI solution, probably fixes the more complex scenarios

epriestley claimed this task.

Sounds like this is resolved one way or the other. In the general case, "Another Herald rule" effectively allows you to group, negate, and combine conditions in addition to reusing/including them.

(I think these kinds of very complex rules are unusual so I'd hesitate to add these capabilities as first-class in the UI without more/stronger use cases.)

yeah, fair enough. if I build a stronger case I'll reopen/refile