mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +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();
|
||||
if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) {
|
||||
$phids = $revision->loadCommitPHIDs();
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||
if (count($handles) == 1) {
|
||||
$body[] = "COMMIT";
|
||||
} else {
|
||||
// This is unlikely to ever happen since we'll send this mail the first
|
||||
// time we discover a commit, but it's not impossible if data was
|
||||
// migrated, etc.
|
||||
$body[] = "COMMITS";
|
||||
}
|
||||
if ($phids) {
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||
if (count($handles) == 1) {
|
||||
$body[] = "COMMIT";
|
||||
} else {
|
||||
// This is unlikely to ever happen since we'll send this mail the
|
||||
// first time we discover a commit, but it's not impossible if data
|
||||
// was migrated, etc.
|
||||
$body[] = "COMMITS";
|
||||
}
|
||||
|
||||
foreach ($handles as $handle) {
|
||||
$body[] = ' '.PhabricatorEnv::getProductionURI($handle->getURI());
|
||||
foreach ($handles as $handle) {
|
||||
$body[] = ' '.PhabricatorEnv::getProductionURI($handle->getURI());
|
||||
}
|
||||
$body[] = null;
|
||||
}
|
||||
$body[] = null;
|
||||
}
|
||||
|
||||
return implode("\n", $body);
|
||||
|
|
Loading…
Reference in a new issue