@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.

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

+11
+11
src/applications/audit/storage/PhabricatorAuditTransaction.php
··· 49 49 return $blocks; 50 50 } 51 51 52 + public function getActionStrength() { 53 + $type = $this->getTransactionType(); 54 + 55 + switch ($type) { 56 + case self::TYPE_COMMIT: 57 + return 3.0; 58 + } 59 + 60 + return parent::getActionStrength(); 61 + } 62 + 52 63 public function getRequiredHandlePHIDs() { 53 64 $phids = parent::getRequiredHandlePHIDs(); 54 65