Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13993040
D15918.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15918.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -1510,6 +1510,27 @@
return array();
}
+ // Remove packages that the revision author is an owner of. If you own
+ // code, you don't need another owner to review it.
+ $authority = id(new PhabricatorOwnersPackageQuery())
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
+ ->withPHIDs(mpull($packages, 'getPHID'))
+ ->withAuthorityPHIDs(array($object->getAuthorPHID()))
+ ->execute();
+ $authority = mpull($authority, null, 'getPHID');
+
+ foreach ($packages as $key => $package) {
+ $package_phid = $package->getPHID();
+ if ($authority[$package_phid]) {
+ unset($packages[$key]);
+ continue;
+ }
+ }
+
+ if (!$packages) {
+ return array();
+ }
+
$auto_subscribe = array();
$auto_review = array();
$auto_block = array();
diff --git a/src/docs/user/userguide/owners.diviner b/src/docs/user/userguide/owners.diviner
--- a/src/docs/user/userguide/owners.diviner
+++ b/src/docs/user/userguide/owners.diviner
@@ -45,6 +45,32 @@
which affect them in Diffusion or Differential.
+Auto Review
+===========
+
+You can configure **Auto Review** for packages. When a new code review is
+created in Differential which affects code in a package, the package can
+automatically be added as a subscriber or reviewer.
+
+The available settings are:
+
+ - **No Autoreview**: This package will not be added to new reviews.
+ - **Subscribe to Changes**: This package will be added to reviews as a
+ subscriber. Owners will be notified of changes, but not required to act.
+ - **Review Changes**: This package will be added to reviews as a reviewer.
+ Reviews will appear on the dashboards of package owners.
+ - **Review Changes (Blocking)** This package will be added to reviews
+ as a blocking reviewer. A package owner will be required to accept changes
+ before they may land.
+
+NOTE: These rules **do not trigger** if the change author is a package owner.
+They only apply to changes made by users who aren't already owners.
+
+The intent of this feature is to make it easy to configure simple, reasonable
+behaviors. If you want more tailored or specific triggers, you can write more
+powerful rules by using Herald.
+
+
Files in Multiple Packages
==========================
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 23, 8:17 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6745039
Default Alt Text
D15918.diff (2 KB)
Attached To
Mode
D15918: Don't trigger "Auto Review" if the author is already an owner; document "Auto Review"
Attached
Detach File
Event Timeline
Log In to Comment