mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 03:11:01 +01:00
Don't send a blank "COMMITS" field for mark-committed revisions.
This commit is contained in:
parent
24d01d39c6
commit
689eb11ff3
1 changed files with 14 additions and 12 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue