mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-08 22:01:03 +01:00
Give "x committed <commit>" feed stories an explicitly higher action strength than other transactions
Summary: Fixes T12811. The issue here //appears// to be that both the "alice committed rXYZabc" and "Herald added projects..." actions have the same (default) strength and end up applying in arbitrary order, and probably got shuffled around as this transitioned to Modular transactions. Give "alice committed rXYZabc" an explicitly higher action strength. Test Plan: - Wrote an "Always, add project X" Herald rule for commits. - Ran `bin/repository reparse --herald ...`. - Saw an "alice committed rXYZabc" story instead of a "Herald added projects: X" story. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12811 Differential Revision: https://secure.phabricator.com/D18104
This commit is contained in:
parent
8ef9490f66
commit
e26cd3ffe0
1 changed files with 11 additions and 0 deletions
|
@ -49,6 +49,17 @@ final class PhabricatorAuditTransaction
|
|||
return $blocks;
|
||||
}
|
||||
|
||||
public function getActionStrength() {
|
||||
$type = $this->getTransactionType();
|
||||
|
||||
switch ($type) {
|
||||
case self::TYPE_COMMIT:
|
||||
return 3.0;
|
||||
}
|
||||
|
||||
return parent::getActionStrength();
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDs() {
|
||||
$phids = parent::getRequiredHandlePHIDs();
|
||||
|
||||
|
|
Loading…
Reference in a new issue