When Owners package is set to Audit Commits With No Owner Involvement and such commit lands, it is not triggered for audit (but is added into owners package commit log)
It is, because on this one line of code, there should be return false instead of return true.
https://we.phorge.it/source/phorge/browse/master/src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php$330
If there is no revision, owner is not involved (exactly as comment couple lines higher says) -> return false.
This used to be a part of shouldTriggerAudit method (thats why there is return true), but it was moved into isOwnerInvolved method, where it should be negated.
But it is still the same as was in shouldTriggerAudit.
Reproduction steps:
- As User A create Owners Package O with Audit set to "Commits With no Owner Involvement" on repository path P
- Commit as User B into repository path P without any preceding revisions.
- Package will not trigger audit, but it should
Originated from Q174, previously reported on Phabricator discourse and Phabricator
As @valerio.bozzolan noted, seems as regression from this change rP2e9cc5e8e8a30fff511596a4edf5fb582fba2347 since 2017
Thanks for looking into it!