mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
Don't synchronize Asana objects with no CCs and no responsible, non-author users
Summary: Ref T2852. Currently, we publish commits with no audit requests and reviews with no CCs or reviewers into Asana. This creates undesired notifications, so drop events which would publish an object that doesn't exist yet and has no followers or respible users. Test Plan: Used `bin/feed republish` to publish a story about an object with no related users, saw the publish abort with the new message. Added a CC, published again, got a publish. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2852 Differential Revision: https://secure.phabricator.com/D6727
This commit is contained in:
parent
a0f0ba6acd
commit
da8ffbac12
1 changed files with 8 additions and 0 deletions
|
@ -283,6 +283,14 @@ final class DoorkeeperFeedWorkerAsana extends FeedPushWorker {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// If there are no followers (CCs), and no active or passive users
|
||||
// (reviewers or auditors), and we haven't synchronized the object before,
|
||||
// don't synchronize the object.
|
||||
if (!$active_phids && !$passive_phids && !$follow_phids) {
|
||||
$this->log("Object has no followers or active/passive users.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$parent = $this->makeAsanaAPICall(
|
||||
$oauth_token,
|
||||
'tasks',
|
||||
|
|
Loading…
Reference in a new issue