Public Access
chore: complete namespace cleanup — remove all mokoplatform/MokoStandards/MokoEnterprise refs
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 16s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 16s
Sweep 391 files across templates, workflows, MCP servers, CLI tools, lib, deploy, validate, wrappers, configs, and docs. All references to mokoplatform, moko-platform, MokoStandards, MokoStandards-API, and MokoEnterprise replaced with mokocli/MokoCli. Also renamed moko-platform.sublime-project → mokocli.sublime-project and fixed composer.json description.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* FILE INFORMATION
|
||||
* DEFGROUP: MokoPlatform.Enterprise
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||
* PATH: /lib/Enterprise/RepositorySynchronizer.php
|
||||
* BRIEF: Repository synchronization enterprise library
|
||||
*/
|
||||
@@ -165,8 +165,8 @@ class RepositorySynchronizer
|
||||
// Resolve repo root (three levels up from this file: Enterprise/ → lib/ → root)
|
||||
// API repo root (definitions, sync code)
|
||||
$repoRoot = dirname(dirname(__DIR__));
|
||||
// mokoplatform repo root (templates, configs)
|
||||
$standardsRoot = getenv('MOKOSTANDARDS_ROOT') ?: dirname($repoRoot) . '/mokoplatform';
|
||||
// mokocli repo root (templates, configs)
|
||||
$standardsRoot = getenv('MOKOSTANDARDS_ROOT') ?: dirname($repoRoot) . '/mokocli';
|
||||
|
||||
// Detect platform from repo metadata
|
||||
$repoInfo = $this->adapter->getRepo($org, $repo);
|
||||
@@ -364,7 +364,7 @@ class RepositorySynchronizer
|
||||
* @param string $repo
|
||||
* @param string $platform Detected platform slug (e.g. 'dolibarr')
|
||||
* @param array<int, array{source?: string, inline_content?: string, destination: string, always_overwrite: bool}> $filesToSync
|
||||
* @param string $repoRoot Absolute path to the mokoplatform repository root
|
||||
* @param string $repoRoot Absolute path to the mokocli repository root
|
||||
* @param bool $force When true, overwrite files even when always_overwrite = false
|
||||
* @return array{number: ?int, summary: array}
|
||||
*/
|
||||
@@ -421,7 +421,7 @@ class RepositorySynchronizer
|
||||
|
||||
// Create tracking issue (no PR — files pushed directly to default branch)
|
||||
$issueBody = $this->generatePRBody($summary);
|
||||
$issueTitle = 'chore: mokoplatform v' . self::STANDARDS_MINOR . ' sync — ' . count($summary['copied']) . ' files updated';
|
||||
$issueTitle = 'chore: mokocli v' . self::STANDARDS_MINOR . ' sync — ' . count($summary['copied']) . ' files updated';
|
||||
$issueNumber = null;
|
||||
|
||||
try {
|
||||
@@ -478,7 +478,7 @@ class RepositorySynchronizer
|
||||
* never added.
|
||||
*
|
||||
* @param string $existing Current file content from the remote repo
|
||||
* @param string $template Template file content from mokoplatform
|
||||
* @param string $template Template file content from mokocli
|
||||
* @return string Merged content
|
||||
*/
|
||||
/**
|
||||
@@ -501,7 +501,7 @@ class RepositorySynchronizer
|
||||
* @param string $repo Repository name
|
||||
* @param string $platform Detected platform type
|
||||
* @param array $filesToSync Files to synchronize
|
||||
* @param string $repoRoot Path to mokoplatform root
|
||||
* @param string $repoRoot Path to mokocli root
|
||||
* @param bool $force Force overwrite
|
||||
* @param string $branchName Target branch
|
||||
* @param string|null $moduleId Dolibarr module ID (pre-fetched)
|
||||
@@ -583,7 +583,7 @@ class RepositorySynchronizer
|
||||
$repo,
|
||||
$targetPath,
|
||||
$content,
|
||||
"chore: update {$targetPath} from mokoplatform",
|
||||
"chore: update {$targetPath} from mokocli",
|
||||
$existingFile['sha'] ?? null,
|
||||
$branchName
|
||||
);
|
||||
@@ -597,7 +597,7 @@ class RepositorySynchronizer
|
||||
$repo,
|
||||
$targetPath,
|
||||
$content,
|
||||
"chore: add {$targetPath} from mokoplatform",
|
||||
"chore: add {$targetPath} from mokocli",
|
||||
null,
|
||||
$branchName
|
||||
);
|
||||
@@ -613,7 +613,7 @@ class RepositorySynchronizer
|
||||
$repo,
|
||||
$targetPath,
|
||||
$content,
|
||||
"chore: update {$targetPath} from mokoplatform",
|
||||
"chore: update {$targetPath} from mokocli",
|
||||
$existing['sha'] ?? null,
|
||||
$branchName
|
||||
);
|
||||
@@ -782,7 +782,7 @@ class RepositorySynchronizer
|
||||
'license' => 'GPL-3.0-or-later',
|
||||
'topics' => $repoInfo['topics'] ?? [],
|
||||
'language' => $repoInfo['language'] ?? ManifestParser::platformLanguage($platform),
|
||||
'package_type' => mokoplatformParser::platformPackageType($platform),
|
||||
'package_type' => mokocliParser::platformPackageType($platform),
|
||||
'last_synced' => date('c'),
|
||||
];
|
||||
|
||||
@@ -1110,7 +1110,7 @@ class RepositorySynchronizer
|
||||
// so repos have a safe place for custom workflows that sync won't touch.
|
||||
$entries[] = [
|
||||
'inline_content' => "# Custom Workflows\n\nPlace repo-specific workflows here.\n\n"
|
||||
. "- **Never overwritten** by mokoplatform bulk sync\n"
|
||||
. "- **Never overwritten** by mokocli bulk sync\n"
|
||||
. "- **Never deleted** by the repository-cleanup workflow\n"
|
||||
. "- Safe for custom CI, notifications, or repo-specific automation\n\n"
|
||||
. "Synced workflows live in the parent `{$wfDir}/` directory.\n",
|
||||
@@ -1261,7 +1261,7 @@ class RepositorySynchronizer
|
||||
|
||||
// Append missing lines with a clear separator
|
||||
$merged = rtrim($existing) . "\n\n"
|
||||
. "# ── mokoplatform sync (auto-appended) ────────────────────────────────\n"
|
||||
. "# ── mokocli sync (auto-appended) ────────────────────────────────\n"
|
||||
. implode("\n", $missing) . "\n";
|
||||
|
||||
return $merged;
|
||||
@@ -1313,7 +1313,7 @@ class RepositorySynchronizer
|
||||
'{{standards_version}}' => self::STANDARDS_VERSION,
|
||||
'{{standards_minor}}' => self::STANDARDS_MINOR,
|
||||
'{{standards_branch}}' => self::VERSION_BRANCH,
|
||||
// Single-brace tokens — used by GitHub repository templates and older mokoplatform stubs
|
||||
// Single-brace tokens — used by GitHub repository templates and older mokocli stubs
|
||||
'{REPO_NAME}' => $repoInfo['name'] ?? $repo,
|
||||
'{REPO_URL}' => "https://github.com/{$org}/{$repo}",
|
||||
'{REPO_DESCRIPTION}' => $repoInfo['description'] ?? '',
|
||||
@@ -1383,8 +1383,8 @@ class RepositorySynchronizer
|
||||
*/
|
||||
private function generatePRBody(array $summary): string
|
||||
{
|
||||
$body = "## mokoplatform Synchronization\n\n";
|
||||
$body .= "This PR synchronizes workflows, configurations, and scripts from the mokoplatform repository.\n\n";
|
||||
$body = "## mokocli Synchronization\n\n";
|
||||
$body .= "This PR synchronizes workflows, configurations, and scripts from the mokocli repository.\n\n";
|
||||
|
||||
// Summary statistics
|
||||
$body .= "### Summary\n";
|
||||
@@ -1419,7 +1419,7 @@ class RepositorySynchronizer
|
||||
$body .= "- Verify issue templates render correctly\n\n";
|
||||
|
||||
$body .= "---\n";
|
||||
$body .= "*This PR was automatically generated by the mokoplatform bulk sync process.*\n";
|
||||
$body .= "*This PR was automatically generated by the mokocli bulk sync process.*\n";
|
||||
|
||||
return $body;
|
||||
}
|
||||
@@ -1524,7 +1524,7 @@ class RepositorySynchronizer
|
||||
default => 'EDEDED',
|
||||
},
|
||||
match ($label) {
|
||||
'mokostandards' => 'mokoplatform compliance',
|
||||
'mokostandards' => 'mokocli compliance',
|
||||
'type: chore' => 'Maintenance tasks',
|
||||
'automation' => 'Automated processes or scripts',
|
||||
default => '',
|
||||
|
||||
Reference in New Issue
Block a user