Don't send a blank "COMMITS" field for mark-committed revisions.
This commit is contained in:
@@ -111,20 +111,22 @@ class DifferentialCommentMail extends DifferentialMail {
|
|||||||
$revision = $this->getRevision();
|
$revision = $this->getRevision();
|
||||||
if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) {
|
if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) {
|
||||||
$phids = $revision->loadCommitPHIDs();
|
$phids = $revision->loadCommitPHIDs();
|
||||||
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
if ($phids) {
|
||||||
if (count($handles) == 1) {
|
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||||
$body[] = "COMMIT";
|
if (count($handles) == 1) {
|
||||||
} else {
|
$body[] = "COMMIT";
|
||||||
// This is unlikely to ever happen since we'll send this mail the first
|
} else {
|
||||||
// time we discover a commit, but it's not impossible if data was
|
// This is unlikely to ever happen since we'll send this mail the
|
||||||
// migrated, etc.
|
// first time we discover a commit, but it's not impossible if data
|
||||||
$body[] = "COMMITS";
|
// was migrated, etc.
|
||||||
}
|
$body[] = "COMMITS";
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($handles as $handle) {
|
foreach ($handles as $handle) {
|
||||||
$body[] = ' '.PhabricatorEnv::getProductionURI($handle->getURI());
|
$body[] = ' '.PhabricatorEnv::getProductionURI($handle->getURI());
|
||||||
|
}
|
||||||
|
$body[] = null;
|
||||||
}
|
}
|
||||||
$body[] = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode("\n", $body);
|
return implode("\n", $body);
|
||||||
|
|||||||
Reference in New Issue
Block a user