mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01: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:
parent
3524ba3fb5
commit
8867e50d63
1 changed files with 5 additions and 2 deletions
|
@ -404,8 +404,11 @@ final class HeraldCommitAdapter extends HeraldAdapter {
|
||||||
if (!$revision) {
|
if (!$revision) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
|
// after a revision is accepted, it can be closed (say via arc land)
|
||||||
if ($revision->getStatus() != $status_accepted) {
|
// 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 null;
|
||||||
}
|
}
|
||||||
return $revision->getPHID();
|
return $revision->getPHID();
|
||||||
|
|
Loading…
Reference in a new issue