mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Respect external unmentionable PHIDs in Differential revision editor
Summary: See PHI574. Ref T13120. When you `Ref Txx` or `Fixes Txxx`, we mark it "unmentionable" to prevent the task from generating both a reference and a mention. If you add a reference to an object (like a commit hash) to a custom remarkup field, there's currently no real way to prevent it from generating a mention, except that you can explicitly mark the PHID as unmentionable on the Editor. This isn't exactly a first-class feature, but we technically do it in `PhabricatorRepositoryCommitMessageParserWorker`, and it probably doesn't hurt or interfere with anything to support it slightly better. In Differential, respect any existing value and append new values to it rather than overwriting the value. Test Plan: Edited a revision summary to include `Ref Txxx`, saw only a reference (not a mention) generate. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13120 Differential Revision: https://secure.phabricator.com/D19361
This commit is contained in:
parent
70056a9072
commit
c52e10d1ec
1 changed files with 7 additions and 5 deletions
|
@ -850,11 +850,13 @@ final class DifferentialTransactionEditor
|
|||
$revert_phids = array();
|
||||
}
|
||||
|
||||
$this->setUnmentionablePHIDMap(
|
||||
array_merge(
|
||||
$task_phids,
|
||||
$rev_phids,
|
||||
$revert_phids));
|
||||
// See PHI574. Respect any unmentionable PHIDs which were set on the
|
||||
// Editor by the caller.
|
||||
$unmentionable_map = $this->getUnmentionablePHIDMap();
|
||||
$unmentionable_map += $task_phids;
|
||||
$unmentionable_map += $rev_phids;
|
||||
$unmentionable_map += $revert_phids;
|
||||
$this->setUnmentionablePHIDMap($unmentionable_map);
|
||||
|
||||
$result = array();
|
||||
foreach ($edges as $type => $specs) {
|
||||
|
|
Loading…
Reference in a new issue