mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 14:21:02 +01:00
Start revisions in "Draft" if prototypes are enabled
Summary: Ref T2543. This is a less ambitious version of the rule in D18628, which I backed off from, since I think this probably still has a fair number of loose ends to tie up. Test Plan: Created a revision locally. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18713
This commit is contained in:
parent
d36f98a15a
commit
bfabe49c5a
1 changed files with 7 additions and 1 deletions
|
@ -67,13 +67,19 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
$view_policy = $app->getPolicy(
|
||||
DifferentialDefaultViewCapability::CAPABILITY);
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('phabricator.show-prototypes')) {
|
||||
$initial_state = DifferentialRevisionStatus::DRAFT;
|
||||
} else {
|
||||
$initial_state = DifferentialRevisionStatus::NEEDS_REVIEW;
|
||||
}
|
||||
|
||||
return id(new DifferentialRevision())
|
||||
->setViewPolicy($view_policy)
|
||||
->setAuthorPHID($actor->getPHID())
|
||||
->attachRepository(null)
|
||||
->attachActiveDiff(null)
|
||||
->attachReviewers(array())
|
||||
->setModernRevisionStatus(DifferentialRevisionStatus::NEEDS_REVIEW);
|
||||
->setModernRevisionStatus($initial_state);
|
||||
}
|
||||
|
||||
protected function getConfiguration() {
|
||||
|
|
Loading…
Reference in a new issue