-
-
Notifications
You must be signed in to change notification settings - Fork 1
docs: update release please release description #154
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
35055bb
0407740
cd33ab0
97bb7f9
c97a060
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 |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| "include-v-in-tag": false, | ||
| "include-component-in-tag": false, | ||
| "pull-request-title-pattern": "chore: Next Release ${version}", | ||
| "pull-request-header": "## Release ${version}", | ||
| "pull-request-header": "## Upcoming Release", | ||
|
||
| "changelog-sections": [ | ||
| { | ||
| "type": "feat", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| use Laravel\Prompts\SelectPrompt; | ||
| use Magento\Framework\Console\Cli; | ||
| use OpenForgeProject\MageForge\Service\ThemeSuggester; | ||
| use OpenForgeProject\MageForge\Model\ThemeList; | ||
| use Symfony\Component\Console\Command\Command; | ||
| use Symfony\Component\Console\Input\InputInterface; | ||
| use Symfony\Component\Console\Output\OutputInterface; | ||
|
|
@@ -478,4 +479,72 @@ private function removeSecureEnvironmentValue(string $name): void | |
| unset($this->secureEnvStorage[$name]); | ||
| $this->clearEnvironmentCache(); | ||
| } | ||
|
|
||
| /** | ||
| * Resolve vendor theme codes (e.g., Vendor to all underlying vendor themes) | ||
| * | ||
| * @param array<string> $themeCodes | ||
| * @param ThemeList $themeList | ||
| * @return array<string> | ||
| */ | ||
|
Comment on lines
+483
to
+489
|
||
| protected function resolveVendorThemes( | ||
| array $themeCodes, | ||
| ThemeList $themeList | ||
| ): array { | ||
| $resolved = []; | ||
| $availableThemes = null; | ||
|
|
||
| foreach ($themeCodes as $code) { | ||
| // Check if it's explicitly a wildcard OR just a vendor name without a slash | ||
| $isExplicitWildcard = \str_ends_with($code, '/*'); | ||
| $isVendorOnly = !\str_contains($code, '/'); | ||
|
|
||
| if ($isExplicitWildcard || $isVendorOnly) { | ||
| // Lazy-load themes only when needed | ||
| if ($availableThemes === null) { | ||
| $availableThemes = array_map( | ||
| fn($theme) => $theme->getCode(), | ||
| $themeList->getAllThemes() | ||
| ); | ||
| } | ||
|
|
||
| if ($isExplicitWildcard) { | ||
| $prefix = substr($code, 0, -1); // Keeps the trailing slash, e.g. "Vendor/" | ||
| } else { | ||
| $prefix = $code . '/'; // e.g. "Vendor" -> "Vendor/" | ||
| } | ||
|
|
||
| $matched = array_filter( | ||
| $availableThemes, | ||
| fn(string $availableCode) => \str_starts_with($availableCode, $prefix) | ||
| ); | ||
|
|
||
| if (empty($matched)) { | ||
| $this->io->warning(sprintf("No themes found for vendor/prefix '%s'", $prefix)); | ||
|
|
||
| // If they typed just a word and it wasn't a vendor, | ||
| // we still add it so standard Magento validation kicks in later. | ||
| if ($isVendorOnly) { | ||
| $resolved[] = $code; | ||
| } | ||
| } else { | ||
| $this->io->note(sprintf( | ||
| "Resolved vendor '%s' to %d theme(s): %s", | ||
| $code, | ||
| count($matched), | ||
| implode(', ', $matched) | ||
| )); | ||
|
|
||
| foreach ($matched as $match) { | ||
| $resolved[] = $match; | ||
| } | ||
| } | ||
| } else { | ||
| $resolved[] = $code; | ||
| } | ||
| } | ||
|
|
||
| // Return a fresh list without duplicates | ||
| return array_values(array_unique($resolved)); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,7 +51,7 @@ protected function configure(): void | |||||||||||||||||||||
| ->addArgument( | ||||||||||||||||||||||
| 'themeCodes', | ||||||||||||||||||||||
| InputArgument::IS_ARRAY, | ||||||||||||||||||||||
| 'Theme codes to build (format: Vendor/theme, Vendor/theme 2, ...)', | ||||||||||||||||||||||
| 'Theme codes to build (format: Vendor/theme, Vendor, ...)', | ||||||||||||||||||||||
|
||||||||||||||||||||||
| 'Theme codes to build (format: Vendor/theme, Vendor, ...)', | |
| 'Theme codes to build (format: Vendor/theme, Vendor, Vendor/*, ...)', |
Copilot
AI
Mar 20, 2026
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.
The inline comment says this block is for “wildcards”, but resolveVendorThemes() also expands vendor-only inputs (e.g. Vendor). Please adjust the comment to reflect both behaviors to avoid misleading future readers.
| // Allow wildcards using the AbstractCommand helper | |
| if (!empty($themeCodes)) { | |
| $themeCodes = $this->resolveVendorThemes($themeCodes, $this->themeList); | |
| // If wildcards matched nothing and no other explicit themes remain | |
| // Resolve vendor-only inputs and wildcard patterns using the helper | |
| if (!empty($themeCodes)) { | |
| $themeCodes = $this->resolveVendorThemes($themeCodes, $this->themeList); | |
| // If resolution matched no themes and no other explicit themes remain |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -49,7 +49,7 @@ protected function configure(): void | |||||
| ->addArgument( | ||||||
| 'themeCodes', | ||||||
| InputArgument::IS_ARRAY, | ||||||
| 'Theme codes to clean (format: Vendor/theme, Vendor/theme 2, ...)', | ||||||
| 'Theme codes to clean (format: Vendor/theme, Vendor, ...)', | ||||||
|
||||||
| 'Theme codes to clean (format: Vendor/theme, Vendor, ...)', | |
| 'Theme codes to clean (format: Vendor/theme, Vendor, Vendor/*, ...)', |
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.
In the usage line, the placeholder name
<themename>is inconsistent with the actual CLI argument name (themeCodes) used in the command definition and with the build command’s docs. Consider changing it to something like<themeCodes>...for consistency.