1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Add BRANCH to Accepted and Needs Revision e-mails

Summary:
I always forget a branch which I used for the diff so that I must open
my browser which takes some time. This diff adds the name of the branch to the
sent e-mails. But only if the diff is in the state Accepted or Needs Revision to
not pollute other e-mails.

Test Plan:
Comment
Request changes
Accept
Look at the e-mails

Reviewers: epriestley

Reviewed By: epriestley

CC: olivier, aran, epriestley, vrana

Differential Revision: https://secure.phabricator.com/D1396
This commit is contained in:
vrana 2012-01-13 15:53:40 -08:00
parent c6febdfc52
commit 4cff02dcc0

View file

@ -138,8 +138,21 @@ class DifferentialCommentMail extends DifferentialMail {
$body[] = null;
$revision = $this->getRevision();
if ($revision->getStatus() ==
ArcanistDifferentialRevisionStatus::COMMITTED) {
$status = $revision->getStatus();
if ($status == ArcanistDifferentialRevisionStatus::NEEDS_REVISION ||
$status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
$diff = $revision->loadActiveDiff();
if ($diff) {
$branch = $diff->getBranch();
if ($branch) {
$body[] = "BRANCH\n $branch";
$body[] = null;
}
}
}
if ($status == ArcanistDifferentialRevisionStatus::COMMITTED) {
$phids = $revision->loadCommitPHIDs();
if ($phids) {
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();