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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user