1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Herald - tweak accepted differential revision check slightly

Summary: use the loadReviewedBy function, which seems to do what we want -- returns a reviewer IFF the last thing was an accept

Test Plan: i believe in the power of loadReviewedBy

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran, aarwine

Differential Revision: https://secure.phabricator.com/D7903
This commit is contained in:
Bob Trahan 2014-01-08 11:53:13 -08:00
parent 3524ba3fb5
commit 8867e50d63

View file

@ -404,8 +404,11 @@ final class HeraldCommitAdapter extends HeraldAdapter {
if (!$revision) {
return null;
}
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
if ($revision->getStatus() != $status_accepted) {
// after a revision is accepted, it can be closed (say via arc land)
// so use this function to figure out if it was accepted at one point
// *and* not later rejected... what a function!
$reviewed_by = $revision->loadReviewedBy();
if (!$reviewed_by) {
return null;
}
return $revision->getPHID();