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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user