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

Disable Herald more aggressively when it's turned off for a repository

Summary:
Currently, disabling Herald only disables feed, notifications and email. Historically, audits didn't really create external effects so it made sense for Herald to only partially disable itself.

With the advent of Harbormaster/Build Plans, it makes more sense for Herald to just stop doing anything. When this option is disabled, stop all audit/build/publish/feed/email actions for the repository.

Test Plan: Ran `scripts/repository/reparse.php --herald`, etc.

Reviewers: dctrwatson, btrahan

Reviewed By: btrahan

Subscribers: aran, epriestley

Differential Revision: https://secure.phabricator.com/D8509

+10 -6
+2 -1
src/applications/diffusion/controller/DiffusionRepositoryEditActionsController.php
··· 75 75 "Normally, Phabricator publishes notifications when it discovers ". 76 76 "new commits. You can disable publishing for this repository by ". 77 77 "turning off **Notify/Publish**. This will disable notifications, ". 78 - "feed, and Herald for this repository.". 78 + "feed, and Herald (including audits and build plans) for this ". 79 + "repository.". 79 80 "\n\n". 80 81 "When Phabricator discovers a new commit, it can automatically ". 81 82 "close associated revisions and tasks. If you don't want ".
+4 -5
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
··· 33 33 return; 34 34 } 35 35 36 + if ($repository->getDetail('herald-disabled')) { 37 + return; 38 + } 39 + 36 40 $data = id(new PhabricatorRepositoryCommitData())->loadOneWhere( 37 41 'commitID = %d', 38 42 $commit->getID()); ··· 74 78 $adapter->getBuildPlans()); 75 79 76 80 $explicit_auditors = $this->createAuditsFromCommitMessage($commit, $data); 77 - 78 - if ($repository->getDetail('herald-disabled')) { 79 - // This just means "disable email"; audits are (mostly) idempotent. 80 - return; 81 - } 82 81 83 82 $this->publishFeedStory($repository, $commit, $data); 84 83
+4
src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
··· 7 7 PhabricatorRepository $repository, 8 8 PhabricatorRepositoryCommit $commit) { 9 9 10 + if ($repository->getDetail('herald-disabled')) { 11 + return; 12 + } 13 + 10 14 $affected_paths = PhabricatorOwnerPathQuery::loadAffectedPaths( 11 15 $repository, 12 16 $commit,