Skip to content

Commit 341116a

Browse files
authored
Removed GitHub token and GitHub repo from the installer. (#1786)
1 parent a85f121 commit 341116a

5 files changed

Lines changed: 1 addition & 287 deletions

File tree

β€Ž.vortex/installer/src/Prompts/Handlers/GithubRepo.phpβ€Ž

Lines changed: 0 additions & 97 deletions
This file was deleted.

β€Ž.vortex/installer/src/Prompts/Handlers/GithubToken.phpβ€Ž

Lines changed: 0 additions & 102 deletions
This file was deleted.

β€Ž.vortex/installer/src/Prompts/PromptManager.phpβ€Ž

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
use DrevOps\VortexInstaller\Prompts\Handlers\DependencyUpdatesProvider;
1515
use DrevOps\VortexInstaller\Prompts\Handlers\DeployType;
1616
use DrevOps\VortexInstaller\Prompts\Handlers\Domain;
17-
use DrevOps\VortexInstaller\Prompts\Handlers\GithubRepo;
18-
use DrevOps\VortexInstaller\Prompts\Handlers\GithubToken;
1917
use DrevOps\VortexInstaller\Prompts\Handlers\HandlerInterface;
2018
use DrevOps\VortexInstaller\Prompts\Handlers\HostingProvider;
2119
use DrevOps\VortexInstaller\Prompts\Handlers\Internal;
@@ -42,7 +40,6 @@
4240
use function Laravel\Prompts\form;
4341
use function Laravel\Prompts\info;
4442
use function Laravel\Prompts\multiselect;
45-
use function Laravel\Prompts\password;
4643
use function Laravel\Prompts\select;
4744
use function Laravel\Prompts\text;
4845

@@ -60,7 +57,7 @@ class PromptManager {
6057
*
6158
* Used to display the progress of the prompts.
6259
*/
63-
const TOTAL_RESPONSES = 21;
60+
const TOTAL_RESPONSES = 22;
6461

6562
/**
6663
* Array of responses.
@@ -122,30 +119,6 @@ public function runPrompts(): void {
122119

123120
->intro('Code repository')
124121
->add(fn($r, $pr, $n): int|string => select(...$this->args(CodeProvider::class)), CodeProvider::id())
125-
->addIf(
126-
fn($r): bool => $this->handlers[GithubToken::id()]->shouldRun($r),
127-
fn($r, $pr, $n) => Tui::note('<info>' . GithubToken::description($r) . '</info>')
128-
)
129-
->addIf(
130-
fn($r): bool => $this->handlers[GithubToken::id()]->shouldRun($r),
131-
function ($r, $pr, $n): string {
132-
$handler = $this->handlers[GithubToken::id()];
133-
$resolved_value = $handler->resolvedValue($r);
134-
if (!empty($resolved_value)) {
135-
Tui::ok($this->label((string) $handler->resolvedMessage($r), 'a'));
136-
return is_string($resolved_value) ? $resolved_value : '';
137-
}
138-
else {
139-
return password(...$this->args(GithubToken::class));
140-
}
141-
},
142-
GithubToken::id()
143-
)
144-
->addIf(
145-
fn($r): bool => $this->handlers[GithubRepo::id()]->shouldRun($r),
146-
fn($r, $pr, $n): string => text(...$this->args(GithubRepo::class, NULL, $r)),
147-
GithubRepo::id()
148-
)
149122

150123
->intro('Drupal')
151124
->add(
@@ -289,8 +262,6 @@ public function runProcessors(): void {
289262
DeployType::id(),
290263
HostingProvider::id(),
291264
Services::id(),
292-
GithubRepo::id(),
293-
GithubToken::id(),
294265
CodeProvider::id(),
295266
ProfileCustom::id(),
296267
Profile::id(),
@@ -355,11 +326,6 @@ public function getResponsesSummary(): array {
355326
$values['Code repository'] = Tui::LIST_SECTION_TITLE;
356327
$values['πŸ—„ Code provider'] = $responses[CodeProvider::id()];
357328

358-
if (!empty($responses[GithubToken::id()])) {
359-
$values['πŸ”‘ GitHub access token'] = 'valid';
360-
}
361-
$values['🏷️ GitHub repository'] = $responses[GithubRepo::id()] ?? '<empty>';
362-
363329
$values['Drupal'] = Tui::LIST_SECTION_TITLE;
364330
$values['πŸ“ Webroot'] = $responses[Webroot::id()];
365331
$values['🧾 Profile'] = $responses[Profile::id()];

β€Ž.vortex/installer/tests/Functional/InstallTest.phpβ€Ž

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
use DrevOps\VortexInstaller\Prompts\Handlers\DependencyUpdatesProvider;
1515
use DrevOps\VortexInstaller\Prompts\Handlers\DeployType;
1616
use DrevOps\VortexInstaller\Prompts\Handlers\Domain;
17-
use DrevOps\VortexInstaller\Prompts\Handlers\GithubRepo;
18-
use DrevOps\VortexInstaller\Prompts\Handlers\GithubToken;
1917
use DrevOps\VortexInstaller\Prompts\Handlers\HostingProvider;
2018
use DrevOps\VortexInstaller\Prompts\Handlers\Internal;
2119
use DrevOps\VortexInstaller\Prompts\Handlers\LabelMergeConflictsPr;
@@ -60,8 +58,6 @@
6058
#[CoversClass(DependencyUpdatesProvider::class)]
6159
#[CoversClass(DeployType::class)]
6260
#[CoversClass(Domain::class)]
63-
#[CoversClass(GithubRepo::class)]
64-
#[CoversClass(GithubToken::class)]
6561
#[CoversClass(HostingProvider::class)]
6662
#[CoversClass(Internal::class)]
6763
#[CoversClass(LabelMergeConflictsPr::class)]

0 commit comments

Comments
Β (0)