diff --git a/src/applications/herald/adapter/HeraldCommitAdapter.php b/src/applications/herald/adapter/HeraldCommitAdapter.php index c749d835a1..6f87bd937f 100644 --- a/src/applications/herald/adapter/HeraldCommitAdapter.php +++ b/src/applications/herald/adapter/HeraldCommitAdapter.php @@ -443,7 +443,10 @@ final class HeraldCommitAdapter extends HeraldAdapter { return null; } - switch ($revision->getStatus()) { + $status = $data->getCommitDetail( + 'precommitRevisionStatus', + $revision->getStatus()); + switch ($status) { case ArcanistDifferentialRevisionStatus::ACCEPTED: case ArcanistDifferentialRevisionStatus::CLOSED: return $revision->getPHID(); diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index cfe340e2b7..8f39666708 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -110,6 +110,11 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker $revision = $revision_query->executeOne(); if ($revision) { + if (!$data->getCommitDetail('precommitRevisionStatus')) { + $data->setCommitDetail( + 'precommitRevisionStatus', + $revision->getStatus()); + } $commit_drev = PhabricatorEdgeConfig::TYPE_COMMIT_HAS_DREV; id(new PhabricatorEdgeEditor()) ->addEdge($commit->getPHID(), $commit_drev, $revision->getPHID())