Homec4science

Allow Herald to trigger audits for users or projects

Authored by epriestley <git@epriestley.com> on Feb 27 2012, 18:36.

Description

Allow Herald to trigger audits for users or projects

Summary:
Allows you to write a commit rule that triggers an audit by a user (personal
rules) or a project (global rules).

Mostly this is trying to make auditing more lightweight and accessible in
environments where setting up Owners packages doesn't make sense.

For instance, Disqus wants a rule like "trigger an audit for everything that
didn't have a Differential revision". While not necessarily scalable, this is a
perfectly reasonable rule for a small company, but a lot of work to implement
with Owners (and you'll get a lot of collateral damage if you don't make every
committer a project owner).

Instead, they can create a project called 'Unreviewed Commits' and write a rule
like:

  • When: Differential revision does not exist
    • Action: Trigger an Audit for project: "Unreviewed Commits"

Then whoever cares can join that project and they'll see those audits in their
queue, and when they approve/raise on commits their actions will affect the
project audit.

Similarly, if I want to look at all commits that match some other rule (say,
XSS) but only want to do it like once a month, I can just set up an audit rule
and go through the queue when I feel like it.

NOTE: This abuses the 'packagePHID' field to also store user and project PHIDs. Through the magic of handles, this (apparently) works fine for now; I'll do a big schema patch soon but have several other edits I want to make at the same time.

Also:

  • Adds an "active" fiew for /audit/, eventually this will be like the

Differential "active" view (stuff that is relevant to you right now).

  • On commits, highlight triggered audits you are responsible for.

Test Plan: Added personal and global audit triggers to Herald, reparsed some
commits with --herald, got audits. Browsed all audit interfaces to make sure
nothing exploded. Viewed a commit where I was responsible for only some audits.
Performed audits and made sure the triggers I am supposed to be responsible for
updated properly.

Reviewers: btrahan, jungejason

Reviewed By: jungejason

CC: aran, epriestley

Maniphest Tasks: T904

Differential Revision: https://secure.phabricator.com/D1690

Details

Committed
epriestley <git@epriestley.com>Feb 27 2012, 18:36
Pushed
aubortJan 31 2017, 17:16
Parents
rPH08dd3bc1d92a: Fixed jump nav repo functionality to not mess with other jump nav functionality
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH109452707241: Allow Herald to trigger audits for users or projects (authored by epriestley <git@epriestley.com>).Feb 27 2012, 18:36