From ad409126b1e526573500b0889eacb4ec3847ea8a Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 23 Aug 2012 10:12:41 -0700 Subject: [PATCH] Fix a bug with owners analysis of commits Summary: If the commit has a known author but that author is different from the revision author or the revision doesn't exist, we'll throw away the commit author and then raise an audit for "Owners Not Involved". Instead, we should just use the commit author in all cases. Test Plan: Debugged this with Zor in IRC, he reported it fixed his issue. Before: http://pastie.org/4574680 ("Author" is empty.) After: http://pastie.org/4574712 ("Author" is correctly recognized.) Reviewers: jungejason, nh, vrana, btrahan Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D3374 --- .../worker/PhabricatorRepositoryCommitOwnersWorker.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php b/src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php index 8955fec475..ad80e13d15 100644 --- a/src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php +++ b/src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php @@ -106,7 +106,6 @@ final class PhabricatorRepositoryCommitOwnersWorker $revision_author_phid = null; $commit_reviewedby_phid = null; - $commit_author_phid = null; if ($revision_id) { $revision = id(new DifferentialRevision())->load($revision_id); @@ -115,7 +114,6 @@ final class PhabricatorRepositoryCommitOwnersWorker $revision_author_phid = $revision->getAuthorPHID(); $revision_reviewedby_phid = $revision->loadReviewedBy(); $commit_reviewedby_phid = $data->getCommitDetail('reviewerPHID'); - $commit_author_phid = $data->getCommitDetail('authorPHID'); if ($revision_author_phid !== $commit_author_phid) { $reasons[] = "Author Not Matching with Revision"; }