Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13979342
D7654.id17290.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
D7654.id17290.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Oct 20 2024, 4:05 AM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719118
Default Alt Text
D7654.id17290.diff (2 KB)
Attached To
Mode
D7654: Add a config flag to treat "Accepted" revisions as "Closed"
Attached
Detach File
Event Timeline
Log In to Comment