mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Display Arcanist project in Differential e-mails
Summary: I need this information quite often. I don't know how many people are working on a single project and this information will be useless for them but I guess it won't hurt much? Test Plan: Commented on accepted revision. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2674
This commit is contained in:
parent
afe9a1a914
commit
5752faecce
2 changed files with 20 additions and 1 deletions
|
@ -105,6 +105,7 @@ final class DifferentialDefaultFieldSelector
|
|||
'DifferentialRevisionIDFieldSpecification',
|
||||
'DifferentialManiphestTasksFieldSpecification',
|
||||
'DifferentialBranchFieldSpecification',
|
||||
'DifferentialArcanistProjectFieldSpecification',
|
||||
'DifferentialCommitsFieldSpecification',
|
||||
)) + $map;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -51,4 +51,22 @@ final class DifferentialArcanistProjectFieldSpecification
|
|||
return $diff->getArcanistProjectPHID();
|
||||
}
|
||||
|
||||
public function renderValueForMail($phase) {
|
||||
$status = $this->getRevision()->getStatus();
|
||||
|
||||
if ($status != ArcanistDifferentialRevisionStatus::NEEDS_REVISION &&
|
||||
$status != ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$diff = $this->getRevision()->loadActiveDiff();
|
||||
if ($diff) {
|
||||
$phid = $diff->getArcanistProjectPHID();
|
||||
if ($phid) {
|
||||
$handle = PhabricatorObjectHandleData::loadOneHandle($phid);
|
||||
return "ARCANIST PROJECT\n ".$handle->getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue