Add a setting to blanket-disable autoclosing revisions in a repository
Summary: For git workflows where developers push personal feature branches to the origin, this is a quick workaround until T1210 is implemented properly. I'll also mention this in D2446. Test Plan: - Committed a revision in an "autoclose" repository; it was autoclosed. Committed a revision in a no-autoclose repository, it was not autoclosed. - Edited repositories, saving the "autoclose" setting as enabled/disabled. Reviewers: aurelijus, btrahan Reviewed By: aurelijus CC: aran Maniphest Tasks: T1210 Differential Revision: https://secure.phabricator.com/D2448
This commit is contained in:
@@ -248,6 +248,10 @@ final class PhabricatorRepositoryEditController
|
||||
$repository->setDetail('branch-filter', $branch_filter);
|
||||
}
|
||||
|
||||
$repository->setDetail(
|
||||
'disable-autoclose',
|
||||
$request->getStr('autoclose') == 'disabled' ? true : false);
|
||||
|
||||
$repository->setDetail(
|
||||
'pull-frequency',
|
||||
max(1, $request->getInt('frequency')));
|
||||
@@ -606,6 +610,22 @@ final class PhabricatorRepositoryEditController
|
||||
'Default branch to show in Diffusion.'));
|
||||
}
|
||||
|
||||
$inset
|
||||
->appendChild(id(new AphrontFormSelectControl())
|
||||
->setName('autoclose')
|
||||
->setLabel('Autoclose')
|
||||
->setOptions(array(
|
||||
'enabled' => 'Enabled: Automatically Close Pushed Revisions',
|
||||
'disabled' => 'Disabled: Ignore Pushed Revisions',
|
||||
))
|
||||
->setCaption(
|
||||
"Automatically close Differential revisions which are pushed to ".
|
||||
"this repository.")
|
||||
->setValue(
|
||||
$repository->getDetail('disable-autoclose', false)
|
||||
? 'disabled'
|
||||
: 'enabled'));
|
||||
|
||||
$inset
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
|
||||
Reference in New Issue
Block a user