-
-
Notifications
You must be signed in to change notification settings - Fork 29
[#1949] Added Starter prompt and updated other prompts descriptions. #1952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,7 @@ | |||||||||||||||||||||||||||
| "composer/composer": "^2.8", | ||||||||||||||||||||||||||||
| "cweagans/composer-patches": "^1.7", | ||||||||||||||||||||||||||||
| "czproject/git-php": "^4.3", | ||||||||||||||||||||||||||||
| "laravel/prompts": "^0.3.5", | ||||||||||||||||||||||||||||
| "laravel/prompts": "dev-feature/add-description", | ||||||||||||||||||||||||||||
| "nikic/iter": "^2.4", | ||||||||||||||||||||||||||||
| "sebastian/diff": "*", | ||||||||||||||||||||||||||||
| "symfony/console": "^7.3", | ||||||||||||||||||||||||||||
|
|
@@ -43,6 +43,12 @@ | |||||||||||||||||||||||||||
| "rector/rector": "^2", | ||||||||||||||||||||||||||||
| "symfony/finder": "^7.2" | ||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||
| "repositories": [ | ||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||
| "type": "vcs", | ||||||||||||||||||||||||||||
| "url": "https://github.com/AlexSkrypnyk/prompts.git" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||
|
Comment on lines
+46
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainRestrict the VCS repo to the intended package to reduce supply‑chain blast radius. Composer supports “only” to scope a repository to specific packages. - {
- "type": "vcs",
- "url": "https://github.com/AlexSkrypnyk/prompts.git"
- }
+ {
+ "type": "vcs",
+ "url": "https://github.com/AlexSkrypnyk/prompts.git",
+ "only": ["laravel/prompts"]
+ }Confirm your Composer version supports “only” (Composer 2.x does). If not, skip this change. 🏁 Script executed: #!/bin/bash
composer --versionLength of output: 63 Add “only” to restrict the VCS repository to laravel/prompts - {
- "type": "vcs",
- "url": "https://github.com/AlexSkrypnyk/prompts.git"
- }
+ {
+ "type": "vcs",
+ "url": "https://github.com/AlexSkrypnyk/prompts.git",
+ "only": ["laravel/prompts"]
+ }📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| "autoload": { | ||||||||||||||||||||||||||||
| "psr-4": { | ||||||||||||||||||||||||||||
| "DrevOps\\VortexInstaller\\": "src/" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
|
|
||
| use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector; | ||
| use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; | ||
| use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Scope the skip for SimplifyUselessVariableRector instead of disabling globally. Global skip can hide legitimate cleanups elsewhere. Restrict it to paths where temporary variables aid readability (e.g., prompts/UI), and document the rationale inline. Apply: $config->skip([
@@
- SimplifyUselessVariableRector::class,
+ // Keep temp vars in prompt/UI code for clarity; Rector may over-simplify them.
+ SimplifyUselessVariableRector::class => [
+ __DIR__ . '/src/Prompts/*',
+ __DIR__ . '/src/Utils/*',
+ ],Also applies to: 61-61 🤖 Prompt for AI Agents |
||
| use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector; | ||
| use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; | ||
| use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; | ||
|
|
@@ -57,6 +58,7 @@ | |
| NewlineBeforeNewAssignSetRector::class, | ||
| RemoveAlwaysTrueIfConditionRector::class, | ||
| SimplifyEmptyCheckOnEmptyArrayRector::class, | ||
| SimplifyUselessVariableRector::class, | ||
| // Dependencies. | ||
| '*/vendor/*', | ||
| '*/node_modules/*', | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,17 +25,17 @@ public function label(): string { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * {@inheritdoc} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public function hint(array $responses): ?string { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 'Both providers support equivalent workflow.'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 'Use ⬆ and ⬇ to select the CI provider.'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * {@inheritdoc} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public function options(array $responses): ?array { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $options = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self::NONE => 'None', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self::GITHUB_ACTIONS => 'GitHub Actions', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self::CIRCLECI => 'CircleCI', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| self::NONE => 'None', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
34
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix default when GitHub Actions option is hidden If CodeProvider ≠ GitHub, you unset GHA from options but default() still returns GHA, which can yield an invalid default. Prefer a conditional default. Apply: public function options(array $responses): ?array {
$options = [
self::GITHUB_ACTIONS => 'GitHub Actions',
self::CIRCLECI => 'CircleCI',
self::NONE => 'None',
];
if (isset($responses[CodeProvider::id()]) && $responses[CodeProvider::id()] !== CodeProvider::GITHUB) {
unset($options[self::GITHUB_ACTIONS]);
}
return $options;
}
public function default(array $responses): null|string|bool|array {
- return self::GITHUB_ACTIONS;
+ return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+ ? self::GITHUB_ACTIONS
+ : self::CIRCLECI;
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (isset($responses[CodeProvider::id()]) && $responses[CodeProvider::id()] !== CodeProvider::GITHUB) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ public function label(): string { | |
| * {@inheritdoc} | ||
| */ | ||
| public function hint(array $responses): ?string { | ||
| return 'The database can be downloaded as an exported dump file or pre-packaged in a container image.'; | ||
| return 'Use ⬆ and ⬇ to select the database download source.'; | ||
| } | ||
|
Comment on lines
+35
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) UI text and emoji updates LGTM; verify consistency and terminal rendering
Also applies to: 48-49 🤖 Prompt for AI Agents |
||
|
|
||
| /** | ||
|
|
@@ -45,7 +45,7 @@ public function options(array $responses): ?array { | |
| self::ACQUIA => '💧 Acquia backup', | ||
| self::LAGOON => '🌊 Lagoon environment', | ||
| self::CONTAINER_REGISTRY => '🐳 Container registry', | ||
| self::NONE => '🙅 None', | ||
| self::NONE => '🚫 None', | ||
| ]; | ||
|
|
||
| if (isset($responses[HostingProvider::id()])) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,16 +25,16 @@ public function label(): string { | |||||||||||||||||||||||||||||||||||||||||||
| * {@inheritdoc} | ||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||
| public function hint(array $responses): ?string { | ||||||||||||||||||||||||||||||||||||||||||||
| return 'Use a self-hosted service if you cannot install a GitHub app.'; | ||||||||||||||||||||||||||||||||||||||||||||
| return 'Use ⬆ and ⬇ to select the dependency updates provider.'; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||
| * {@inheritdoc} | ||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||
| public function options(array $responses): ?array { | ||||||||||||||||||||||||||||||||||||||||||||
| return [ | ||||||||||||||||||||||||||||||||||||||||||||
| self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI', | ||||||||||||||||||||||||||||||||||||||||||||
| self::RENOVATEBOT_APP => '🤖 Renovate GitHub app', | ||||||||||||||||||||||||||||||||||||||||||||
| self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI', | ||||||||||||||||||||||||||||||||||||||||||||
| self::NONE => '🚫 None', | ||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
36
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Nit: double space in label There’s an extra space after “+”. - self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
+ self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -43,7 +43,7 @@ public function options(array $responses): ?array { | |||||||||||||||||||||||||||||||||||||||||||
| * {@inheritdoc} | ||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||
| public function default(array $responses): null|string|bool|array { | ||||||||||||||||||||||||||||||||||||||||||||
| return self::RENOVATEBOT_CI; | ||||||||||||||||||||||||||||||||||||||||||||
| return self::RENOVATEBOT_APP; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
45
to
47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainDefault should depend on repository provider Defaulting to GitHub App when the repo provider is not GitHub is misleading. Hide the App option and default to CI when CodeProvider ≠ GitHub. public function options(array $responses): ?array {
- return [
- self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
- self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
- self::NONE => '🚫 None',
- ];
+ $opts = [
+ self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
+ self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
+ self::NONE => '🚫 None',
+ ];
+ if (($responses[CodeProvider::id()] ?? null) !== CodeProvider::GITHUB) {
+ unset($opts[self::RENOVATEBOT_APP]);
+ }
+ return $opts;
} public function default(array $responses): null|string|bool|array {
- return self::RENOVATEBOT_APP;
+ return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+ ? self::RENOVATEBOT_APP
+ : self::RENOVATEBOT_CI;
}Note: CodeProvider is in the same namespace; no import needed. 🏁 Script executed: #!/bin/bash
set -e
# Locate DependencyUpdatesProvider.php
DUP=$(fd DependencyUpdatesProvider.php) || { echo "DependencyUpdatesProvider.php not found"; exit 1; }
echo "=== DependencyUpdatesProvider.php ($DUP) header ==="
sed -n '1,50p' "$DUP"
# Locate CodeProvider.php
CP=$(fd CodeProvider.php) || { echo "CodeProvider.php not found"; exit 1; }
echo "=== CodeProvider.php ($CP) header and contents ==="
sed -n '1,200p' "$CP"
# Extract GITHUB constant and id() method
echo "=== CodeProvider constants and id() method ==="
rg -n 'const\s+GITHUB' "$CP"
rg -n 'function\s+id' "$CP"Length of output: 218 🏁 Script executed: #!/bin/bash
set -e
echo "Finding relevant PHP files..."
find . -type f \( -iname 'DependencyUpdatesProvider.php' -o -iname 'CodeProvider.php' \) > /tmp/found_files.txt
if [[ ! -s /tmp/found_files.txt ]]; then
echo "No files found." >&2
exit 1
fi
echo "Files located:"
cat /tmp/found_files.txt
while read -r file; do
echo -e "\n=== $file (first 200 lines) ==="
sed -n '1,200p' "$file"
done < /tmp/found_files.txtLength of output: 5121 🏁 Script executed: #!/bin/bash
set -e
# Locate AbstractHandler
AH=$(find . -type f -iname AbstractHandler.php | head -n1) || { echo "AbstractHandler.php not found"; exit 1; }
echo "=== AbstractHandler ($AH) ==="
sed -n '1,200p' "$AH"
echo "=== id() method definition ==="
rg -n "function\s\+id" "$AH" -n -C2Length of output: 4523 Depend on repository provider for default and options
public function options(array $responses): ?array {
- return [
- self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
- self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
- self::NONE => '🚫 None',
- ];
+ $opts = [
+ self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
+ self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
+ self::NONE => '🚫 None',
+ ];
+ if (($responses[CodeProvider::id()] ?? null) !== CodeProvider::GITHUB) {
+ unset($opts[self::RENOVATEBOT_APP]);
+ }
+ return $opts;
}
public function default(array $responses): null|string|bool|array {
- return self::RENOVATEBOT_APP;
+ return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+ ? self::RENOVATEBOT_APP
+ : self::RENOVATEBOT_CI;
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,7 +29,7 @@ public function label(): string { | |||||||||||||||
| * {@inheritdoc} | ||||||||||||||||
| */ | ||||||||||||||||
| public function hint(array $responses): ?string { | ||||||||||||||||
| return 'You can deploy code using one or more methods.'; | ||||||||||||||||
| return 'Use ⬆, ⬇ and Space bar to select one or more deployment types.'; | ||||||||||||||||
| } | ||||||||||||||||
|
Comment on lines
31
to
33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Clarify navigation: include Enter to submit selection. Multi-select UIs typically require Enter to continue; add it for consistency and to reduce confusion. - return 'Use ⬆, ⬇ and Space bar to select one or more deployment types.';
+ return 'Use ⬆, ⬇ to navigate, Space to toggle, Enter to continue.';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
| /** | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,7 +29,7 @@ public function label(): string { | |||||||||||||||
| * {@inheritdoc} | ||||||||||||||||
| */ | ||||||||||||||||
| public function hint(array $responses): ?string { | ||||||||||||||||
| return 'Select the hosting provider where the project is hosted. The web root directory will be set accordingly.'; | ||||||||||||||||
| return 'Use ⬆, ⬇ and Space bar to select your hosting provider.'; | ||||||||||||||||
| } | ||||||||||||||||
|
Comment on lines
31
to
33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Single-select hint is misleading; Space isn’t used for selection here. This prompt is single-select. Mention Enter instead of Space to avoid UX confusion. - return 'Use ⬆, ⬇ and Space bar to select your hosting provider.';
+ return 'Use ⬆, ⬇ to navigate and Enter to select your hosting provider.';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
| /** | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Pin the forked laravel/prompts to a commit to ensure reproducible builds.
Tracking a moving dev branch is risky and can break installs unexpectedly, especially with patches enabled.
Example:
Replace with the exact commit you validated.
📝 Committable suggestion
🤖 Prompt for AI Agents