@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -5
+7 -5
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 850 850 $revert_phids = array(); 851 851 } 852 852 853 - $this->setUnmentionablePHIDMap( 854 - array_merge( 855 - $task_phids, 856 - $rev_phids, 857 - $revert_phids)); 853 + // See PHI574. Respect any unmentionable PHIDs which were set on the 854 + // Editor by the caller. 855 + $unmentionable_map = $this->getUnmentionablePHIDMap(); 856 + $unmentionable_map += $task_phids; 857 + $unmentionable_map += $rev_phids; 858 + $unmentionable_map += $revert_phids; 859 + $this->setUnmentionablePHIDMap($unmentionable_map); 858 860 859 861 $result = array(); 860 862 foreach ($edges as $type => $specs) {