fix(cli): fix joomla_release org, element derivation, isset bug
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Generic: Repo Health / Release configuration (push) Blocked by required conditions
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Auto Version Bump / Version Bump (push) Successful in 6s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 1m19s

- Change ORG from mokoconsulting-tech to MokoConsulting
- Fix infourl from github.com to git.mokoconsulting.tech
- Strip type prefix from name before deriving element
- Use array_key_exists instead of isset for null-valued stability

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-28 17:40:24 -05:00
parent 048d1f4914
commit e5e32c4cb7
+6 -4
View File
@@ -37,7 +37,7 @@ use MokoEnterprise\{ApiClient, AuditLogger, CliFramework, Config, PlatformAdapte
class JoomlaRelease extends CliFramework
{
private const VERSION = '04.06.00';
private const ORG = 'mokoconsulting-tech';
private const ORG = 'MokoConsulting';
private const STABILITY_TAGS = [
'development' => 'development',
@@ -75,7 +75,7 @@ class JoomlaRelease extends CliFramework
$stability = (string) $this->getArgument('--stability');
$dryRun = (bool) $this->getArgument('--dry-run');
if (!isset(self::STABILITY_TAGS[$stability])) {
if (!array_key_exists($stability, self::STABILITY_TAGS)) {
$this->log('ERROR', "Invalid stability: {$stability}. Use: " . implode(', ', array_keys(self::STABILITY_TAGS)));
return 1;
}
@@ -213,7 +213,9 @@ class JoomlaRelease extends CliFramework
// Templates don't have <element> — derive from <name>
if ($element === '') {
$element = strtolower(str_replace(' ', '', $name));
// Strip type prefix (e.g. "Template - ") before deriving element
$baseName = preg_replace('/^(Package|Plugin|Module|Component|Template|Library|File)\s*-\s*/i', '', $name);
$element = strtolower(str_replace([' ', '-'], '', $baseName));
}
$tp = '';
@@ -435,7 +437,7 @@ class JoomlaRelease extends CliFramework
$lines[] = ' <tags>';
$lines[] = " <tag>{$stability}</tag>";
$lines[] = ' </tags>';
$lines[] = " <infourl title=\"{$meta['name']}\">https://github.com/" . self::ORG . "</infourl>";
$lines[] = " <infourl title=\"{$meta['name']}\">https://git.mokoconsulting.tech/" . self::ORG . "</infourl>";
$lines[] = ' <downloads>';
$lines[] = " <downloadurl type=\"full\" format=\"zip\">{$zipUrl}</downloadurl>";
$lines[] = " <downloadurl type=\"full\" format=\"tar.gz\">{$tarUrl}</downloadurl>";