Automatically execute tools based on AutomaticRunGroups.
Review Request #6222 — Created Aug. 12, 2014 and submitted
Previously, all tools with
run_automatically
set to True were automatically
executed on every published review request. This has been broken since the
addition of tool profiles.This change fixes automatic execution of tools and changes it such that when a
'review request published' signal is received, tools are automatically executed
only if a set of rules (specified as AutomaticRunGroups) are followed. An
AutomaticRunGroup is very similar to Review Board's DefaultReviewer - it is
basically a set of tool profiles which will be automatically executed when a
file in the diff matches the file regex specified.
Without any AutomaticRunGroups created, I published a review request with a
diff, and did not see a tool execution get created.I then added some AutomaticRunGroups, and tried several cases where a tool
execution was not created (as expected):
- Published a new review request with no diff.
- Updated a review request's title (diff was not added).
- Published a review request in a repository that did not match any
AutomaticRunGroup's repos.
- Published a review request with files that did not match any
AutomaticRunGroup's file regexes.I also tried publishing review requests where tool executions were created, and
reviews were posted by Review Bot:
- Matched an AutomaticRunGroup with a single profile.
- Matched an AutomaticRunGroup with multiple profiles.
- Matched several AutomaticRunGroups with overlapping sets of profiles, and saw
that only unique tool profiles were executed.