1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-20 19:51:08 +01:00

Don't put bad mailing list names in the CC list of a commit message

Summary:
If we can't look up the name for a mailing list, don't put 'Unknown Mailing
List' in the commit message - it will confuse things later down the road.

Surely there is a better way of doing this than checking the name of the
handle for the mailing list.

Test Plan:
called differential.getcommitmessage on a revision that had an invalid mailing
list phid.

Reviewers: epriestley, schrockn, jungejason

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1910
This commit is contained in:
Nick Harper 2012-03-15 00:30:19 -07:00
parent fa687e1773
commit 345340005b

View file

@ -114,7 +114,10 @@ final class DifferentialCCsFieldSpecification
$names = array();
foreach ($this->ccs as $phid) {
$names[] = $this->getHandle($phid)->getName();
$handle = $this->getHandle($phid);
if ($handle->isComplete()) {
$names[] = $handle->getName();
}
}
return implode(', ', $names);
}