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

Don't publish Differential "create" action to Asana

Summary: Ref T2852. Currently there's effectively a double notification: one for creating the task, and one for the "alincoln created this revision" story. Drop the "create" story.

Test Plan: Used `bin/feed republish` to republish "create" and non-"create" stories. Verified "create" was dropped as unsupported, while non-"create" went through.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

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

+17 -1
+17 -1
src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php
··· 4 4 extends DoorkeeperFeedStoryPublisher { 5 5 6 6 public function canPublishStory(PhabricatorFeedStory $story, $object) { 7 - return ($object instanceof DifferentialRevision); 7 + if (!($object instanceof DifferentialRevision)) { 8 + return false; 9 + } 10 + 11 + // Don't publish the "create" story, since pushing the object into Asana 12 + // naturally generates a notification which effectively serves the same 13 + // purpose as the "create" story. 14 + 15 + $action = $story->getStoryData()->getValue('action'); 16 + switch ($action) { 17 + case DifferentialAction::ACTION_CREATE: 18 + return false; 19 + default: 20 + break; 21 + } 22 + 23 + return true; 8 24 } 9 25 10 26 public function willPublishStory($object) {