@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 trigger "Auto Review" if the author is already an owner; document "Auto Review"

Summary:
Ref T10939. If you already own a package, don't trigger the subscribe/review rules.

Document how these rules work.

Test Plan:
- Read documentation.
- Removed reviewers, updated a revision, got autoreviewed.
- Joined package.
- Removed reveiwers, updated a revision, no more autoreview.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10939

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

+47
+21
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 1510 1510 return array(); 1511 1511 } 1512 1512 1513 + // Remove packages that the revision author is an owner of. If you own 1514 + // code, you don't need another owner to review it. 1515 + $authority = id(new PhabricatorOwnersPackageQuery()) 1516 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 1517 + ->withPHIDs(mpull($packages, 'getPHID')) 1518 + ->withAuthorityPHIDs(array($object->getAuthorPHID())) 1519 + ->execute(); 1520 + $authority = mpull($authority, null, 'getPHID'); 1521 + 1522 + foreach ($packages as $key => $package) { 1523 + $package_phid = $package->getPHID(); 1524 + if ($authority[$package_phid]) { 1525 + unset($packages[$key]); 1526 + continue; 1527 + } 1528 + } 1529 + 1530 + if (!$packages) { 1531 + return array(); 1532 + } 1533 + 1513 1534 $auto_subscribe = array(); 1514 1535 $auto_review = array(); 1515 1536 $auto_block = array();
+26
src/docs/user/userguide/owners.diviner
··· 45 45 which affect them in Diffusion or Differential. 46 46 47 47 48 + Auto Review 49 + =========== 50 + 51 + You can configure **Auto Review** for packages. When a new code review is 52 + created in Differential which affects code in a package, the package can 53 + automatically be added as a subscriber or reviewer. 54 + 55 + The available settings are: 56 + 57 + - **No Autoreview**: This package will not be added to new reviews. 58 + - **Subscribe to Changes**: This package will be added to reviews as a 59 + subscriber. Owners will be notified of changes, but not required to act. 60 + - **Review Changes**: This package will be added to reviews as a reviewer. 61 + Reviews will appear on the dashboards of package owners. 62 + - **Review Changes (Blocking)** This package will be added to reviews 63 + as a blocking reviewer. A package owner will be required to accept changes 64 + before they may land. 65 + 66 + NOTE: These rules **do not trigger** if the change author is a package owner. 67 + They only apply to changes made by users who aren't already owners. 68 + 69 + The intent of this feature is to make it easy to configure simple, reasonable 70 + behaviors. If you want more tailored or specific triggers, you can write more 71 + powerful rules by using Herald. 72 + 73 + 48 74 Files in Multiple Packages 49 75 ========================== 50 76