Bring old repository instructions and guidance forward to new UI
Summary: Ref T10923. Fixes T10406. This brings most of the guidance/instructions forward: - Some remained as instructions. - Some moved to documentation. Test Plan: Went through all of the sections and hit the help. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10406, T10923 Differential Revision: https://secure.phabricator.com/D15873
This commit is contained in:
@@ -208,6 +208,22 @@ final class DiffusionRepositoryEditEngine
|
||||
$autoclose_value = $object->getDetail('close-commits-filter', array());
|
||||
$autoclose_value = array_keys($autoclose_value);
|
||||
|
||||
$automation_instructions = pht(
|
||||
"Configure **Repository Automation** to allow Phabricator to ".
|
||||
"write to this repository.".
|
||||
"\n\n".
|
||||
"IMPORTANT: This feature is new, experimental, and not supported. ".
|
||||
"Use it at your own risk.");
|
||||
|
||||
$staging_instructions = pht(
|
||||
"To make it easier to run integration tests and builds on code ".
|
||||
"under review, you can configure a **Staging Area**. When `arc` ".
|
||||
"creates a diff, it will push a copy of the changes to the ".
|
||||
"configured staging area with a corresponding tag.".
|
||||
"\n\n".
|
||||
"IMPORTANT: This feature is new, experimental, and not supported. ".
|
||||
"Use it at your own risk.");
|
||||
|
||||
return array(
|
||||
id(new PhabricatorSelectEditField())
|
||||
->setKey('vcs')
|
||||
@@ -329,7 +345,8 @@ final class DiffusionRepositoryEditEngine
|
||||
->setDescription(pht('Staging area URI.'))
|
||||
->setConduitDescription(pht('Set the staging area URI.'))
|
||||
->setConduitTypeDescription(pht('New staging area URI.'))
|
||||
->setValue($object->getStagingURI()),
|
||||
->setValue($object->getStagingURI())
|
||||
->setControlInstructions($staging_instructions),
|
||||
id(new PhabricatorDatasourceEditField())
|
||||
->setKey('automationBlueprintPHIDs')
|
||||
->setLabel(pht('Use Blueprints'))
|
||||
@@ -340,7 +357,8 @@ final class DiffusionRepositoryEditEngine
|
||||
->setDescription(pht('Automation blueprints.'))
|
||||
->setConduitDescription(pht('Change automation blueprints.'))
|
||||
->setConduitTypeDescription(pht('New blueprint PHIDs.'))
|
||||
->setValue($object->getAutomationBlueprintPHIDs()),
|
||||
->setValue($object->getAutomationBlueprintPHIDs())
|
||||
->setControlInstructions($automation_instructions),
|
||||
id(new PhabricatorStringListEditField())
|
||||
->setKey('symbolLanguages')
|
||||
->setLabel(pht('Languages'))
|
||||
|
||||
@@ -105,6 +105,43 @@ final class DiffusionURIEditEngine
|
||||
} else {
|
||||
$is_builtin = false;
|
||||
$uri_value = $object->getURI();
|
||||
|
||||
if ($object->getRepositoryPHID()) {
|
||||
$repository = $object->getRepository();
|
||||
if ($repository->isGit()) {
|
||||
$uri_instructions = pht(
|
||||
"Provide the URI of a Git repository. It should usually look ".
|
||||
"like one of these examples:\n".
|
||||
"\n".
|
||||
"| Example Git URIs\n".
|
||||
"| -----------------------\n".
|
||||
"| `git@github.com:example/example.git`\n".
|
||||
"| `ssh://user@host.com/git/example.git`\n".
|
||||
"| `https://example.com/repository.git`");
|
||||
} else if ($repository->isHg()) {
|
||||
$uri_instructions = pht(
|
||||
"Provide the URI of a Mercurial repository. It should usually ".
|
||||
"look like one of these examples:\n".
|
||||
"\n".
|
||||
"| Example Mercurial URIs\n".
|
||||
"|-----------------------\n".
|
||||
"| `ssh://hg@bitbucket.org/example/repository`\n".
|
||||
"| `https://bitbucket.org/example/repository`");
|
||||
} else if ($repository->isSVN()) {
|
||||
$uri_instructions = pht(
|
||||
"Provide the **Repository Root** of a Subversion repository. ".
|
||||
"You can identify this by running `svn info` in a working ".
|
||||
"copy. It should usually look like one of these examples:\n".
|
||||
"\n".
|
||||
"| Example Subversion URIs\n".
|
||||
"|-----------------------\n".
|
||||
"| `http://svn.example.org/svnroot/`\n".
|
||||
"| `svn+ssh://svn.example.com/svnroot/`\n".
|
||||
"| `svn://svn.example.net/svnroot/`\n\n".
|
||||
"You **MUST** specify the root of the repository, not a ".
|
||||
"subdirectory.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
|
||||
Reference in New Issue
Block a user