Page MenuHomePhabricator

D7654.diff
No OneTemporary

D7654.diff

Index: src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
===================================================================
--- src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
+++ src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
@@ -146,6 +146,26 @@
"is accidentally closed or if a developer changes his or her ".
"mind after closing a revision. If it is false, reopening ".
"is not allowed.")),
+ $this->newOption('differential.close-on-accept', 'bool', false)
+ ->setBoolOptions(
+ array(
+ pht('Treat Accepted Revisions as "Closed"'),
+ pht('Treat Accepted Revisions as "Open"'),
+ ))
+ ->setSummary(pht('Allows "Accepted" to act as a closed status.'))
+ ->setDescription(
+ pht(
+ 'Normally, Differential revisions remain on the dashboard when '.
+ 'they are "Accepted", and the author then commits the changes '.
+ 'to "Close" the revision and move it off the dashboard.'.
+ "\n\n".
+ 'If you have an unusual workflow where Differential is used for '.
+ 'post-commit review (normally called "Audit", elsewhere in '.
+ 'Phabricator), you can set this flag to treat the "Accepted" '.
+ 'state as a "Closed" state and end the review workflow early.'.
+ "\n\n".
+ 'This sort of workflow is very unusual. Very few installs should '.
+ 'need to change this option.')),
$this->newOption('differential.days-fresh', 'int', 1)
->setSummary(
pht(
Index: src/applications/differential/constants/DifferentialRevisionStatus.php
===================================================================
--- src/applications/differential/constants/DifferentialRevisionStatus.php
+++ src/applications/differential/constants/DifferentialRevisionStatus.php
@@ -72,10 +72,16 @@
}
public static function getClosedStatuses() {
- return array(
+ $statuses = array(
ArcanistDifferentialRevisionStatus::CLOSED,
ArcanistDifferentialRevisionStatus::ABANDONED,
);
+
+ if (PhabricatorEnv::getEnvConfig('differential.close-on-accept')) {
+ $statuses[] = ArcanistDifferentialRevisionStatus::ACCEPTED;
+ }
+
+ return $statuses;
}
public static function getOpenStatuses() {

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 4, 11:22 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719118
Default Alt Text
D7654.diff (2 KB)

Event Timeline