From 8095ea607b626b3e758258582e0651d420646dab Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Thu, 21 May 2026 21:55:24 +0000 Subject: [PATCH] refactor: rename .gitea/ to .mokogitea/ in sync engine (#28) --- .mokogitea/workflows/ci-platform.yml | 2 +- automation/enrich_mokostandards_xml.php | 4 ++-- automation/push_mokostandards_xml.php | 6 +++--- automation/repo_cleanup.php | 2 +- cli/create_project.php | 2 +- cli/manifest_read.php | 11 +++++++---- cli/release.php | 4 ++-- lib/Enterprise/GitPlatformAdapter.php | 4 ++-- lib/Enterprise/GiteaAdapter.php | 6 +++--- lib/Enterprise/MokoStandardsParser.php | 2 +- lib/Enterprise/Plugins/ApiPlugin.php | 6 +++--- lib/Enterprise/Plugins/GenericPlugin.php | 10 +++++----- lib/Enterprise/Plugins/MobilePlugin.php | 6 +++--- lib/Enterprise/Plugins/NodeJsPlugin.php | 6 +++--- lib/Enterprise/Plugins/PythonPlugin.php | 6 +++--- lib/Enterprise/ProjectMetricsCollector.php | 6 +++--- lib/Enterprise/RepositoryHealthChecker.php | 4 ++-- lib/Enterprise/RepositorySynchronizer.php | 8 ++++---- lib/Enterprise/UnifiedValidation.php | 4 ++-- templates/scripts/validate/validate_structure.php | 10 +++++----- tests/Enterprise/GitPlatformAdapterTest.php | 2 +- validate/check_repo_health.php | 2 +- validate/check_structure.php | 2 +- validate/check_version_consistency.php | 2 +- validate/scan_drift.php | 2 +- 25 files changed, 61 insertions(+), 58 deletions(-) diff --git a/.mokogitea/workflows/ci-platform.yml b/.mokogitea/workflows/ci-platform.yml index 14bb85d..aa777f0 100644 --- a/.mokogitea/workflows/ci-platform.yml +++ b/.mokogitea/workflows/ci-platform.yml @@ -348,7 +348,7 @@ jobs: echo "::error file=${file}::Invalid YAML" ERRORS=$((ERRORS + 1)) fi - done < <(find .gitea/workflows/ -name "*.yml" -o -name "*.yaml" 2>/dev/null | tr '\n' '\0') + done < <(find .mokogitea/workflows/ -name "*.yml" -o -name "*.yaml" 2>/dev/null | tr '\n' '\0') { echo "### Template Integrity" diff --git a/automation/enrich_mokostandards_xml.php b/automation/enrich_mokostandards_xml.php index ac75e2d..38d477f 100644 --- a/automation/enrich_mokostandards_xml.php +++ b/automation/enrich_mokostandards_xml.php @@ -276,7 +276,7 @@ foreach ($repos as $repo) { [$ret] = safeExec('git clone --depth 1 --branch ' . escapeshellarg($defaultBranch) . ' ' . escapeshellarg($authedUrl) . ' ' . escapeshellarg($workDir)); if ($ret !== 0) { echo "FAIL (clone)\n"; $stats['failed']++; continue; } - $manifestPath = "{$workDir}/.gitea/.mokostandards"; + $manifestPath = "{$workDir}/.mokogitea/.mokostandards"; if (!file_exists($manifestPath) || !str_contains(file_get_contents($manifestPath), 'extractPlatform(file_get_contents($manifestPath)); @@ -270,7 +270,7 @@ foreach ($repos as $repo) { gitCmd($workDir, 'config', 'user.name', 'gitea-actions[bot]'); gitCmd($workDir, 'config', 'user.email', 'gitea-actions[bot]@git.mokoconsulting.tech'); - gitCmd($workDir, 'add', '.gitea/.mokostandards'); + gitCmd($workDir, 'add', '.mokogitea/.mokostandards'); foreach ($legacyDeleted as $lf) { gitCmd($workDir, 'add', $lf); } diff --git a/automation/repo_cleanup.php b/automation/repo_cleanup.php index e93f8ba..0a522f2 100644 --- a/automation/repo_cleanup.php +++ b/automation/repo_cleanup.php @@ -361,7 +361,7 @@ class RepoCleanup extends CLIApp } catch (\Exception $e) { /* fallback to main */ } // Check both workflow directories for retired workflows (supports dual-platform repos) - $wfDirs = array_unique(['.github/workflows', '.gitea/workflows', $this->adapter->getWorkflowDir()]); + $wfDirs = array_unique(['.github/workflows', '.mokogitea/workflows', $this->adapter->getWorkflowDir()]); foreach (self::RETIRED_WORKFLOWS as $wf) { foreach ($wfDirs as $wfDir) { $path = "{$wfDir}/{$wf}"; diff --git a/cli/create_project.php b/cli/create_project.php index bbe28db..75a5a69 100644 --- a/cli/create_project.php +++ b/cli/create_project.php @@ -162,7 +162,7 @@ function restGet(string $path, string $token, ?\MokoEnterprise\ApiClient $apiCli function detectPlatform(string $org, string $repo, string $token, ?\MokoEnterprise\ApiClient $apiClient = null): string { // Try platform metadata dir first, then root - foreach (['.github/.mokostandards', '.gitea/.mokostandards', '.mokostandards'] as $path) { + foreach (['.github/.mokostandards', '.mokogitea/.mokostandards', '.mokostandards'] as $path) { $data = restGet("repos/{$org}/{$repo}/contents/{$path}", $token, $apiClient); if (!empty($data['content'])) { $content = base64_decode($data['content']); diff --git a/cli/manifest_read.php b/cli/manifest_read.php index 4e8a8ca..19444c9 100644 --- a/cli/manifest_read.php +++ b/cli/manifest_read.php @@ -51,7 +51,7 @@ $manifestFile = null; $candidates = [ "{$root}/.mokogitea/.manifest.xml", "{$root}/.mokogitea/.moko-platform", - "{$root}/.gitea/.mokostandards", // legacy v4 + "{$root}/.mokogitea/.mokostandards", // legacy v4 ]; foreach ($candidates as $candidate) { @@ -76,15 +76,18 @@ if ($xml === false) { $fields = []; if (preg_match('/^platform:\s*(.+)/m', $content, $m)) { $fields['platform'] = trim($m[1], " - \"'"); + +\"'"); } if (preg_match('/^standards_version:\s*(.+)/m', $content, $m)) { $fields['standards-version'] = trim($m[1], " - \"'"); + +\"'"); } if (preg_match('/^governed_repo:\s*(.+)/m', $content, $m)) { $fields['name'] = trim($m[1], " - \"'"); + +\"'"); } } else { // Register namespace for XPath (optional, simple path works without) diff --git a/cli/release.php b/cli/release.php index f92d5bc..63bc23d 100644 --- a/cli/release.php +++ b/cli/release.php @@ -31,8 +31,8 @@ foreach ($argv as $i => $arg) { $repoRoot = dirname(__DIR__, 2); $syncFile = "{$repoRoot}/lib/Enterprise/RepositorySynchronizer.php"; // Check both workflow directories for the bulk-repo-sync workflow -$bulkSyncFile = file_exists("{$repoRoot}/.gitea/workflows/bulk-repo-sync.yml") - ? "{$repoRoot}/.gitea/workflows/bulk-repo-sync.yml" +$bulkSyncFile = file_exists("{$repoRoot}/.mokogitea/workflows/bulk-repo-sync.yml") + ? "{$repoRoot}/.mokogitea/workflows/bulk-repo-sync.yml" : "{$repoRoot}/.github/workflows/bulk-repo-sync.yml"; $cleanupFile = "{$repoRoot}/templates/workflows/shared/repository-cleanup.yml.template"; diff --git a/lib/Enterprise/GitPlatformAdapter.php b/lib/Enterprise/GitPlatformAdapter.php index ddb7f48..39cd340 100644 --- a/lib/Enterprise/GitPlatformAdapter.php +++ b/lib/Enterprise/GitPlatformAdapter.php @@ -50,14 +50,14 @@ interface GitPlatformAdapter /** * Get the workflow directory name for this platform. * - * @return string '.github/workflows' or '.gitea/workflows' + * @return string '.github/workflows' or '.mokogitea/workflows' */ public function getWorkflowDir(): string; /** * Get the platform-specific metadata directory. * - * @return string '.github' or '.gitea' + * @return string '.github' or '.mokogitea' */ public function getMetadataDir(): string; diff --git a/lib/Enterprise/GiteaAdapter.php b/lib/Enterprise/GiteaAdapter.php index a38cbcf..d7e6817 100644 --- a/lib/Enterprise/GiteaAdapter.php +++ b/lib/Enterprise/GiteaAdapter.php @@ -30,7 +30,7 @@ use RuntimeException; * - File ops: POST for create, PUT for update (check existence first) * - Topics: PUT with {"topics": [...]} * - Branch protection: flat API (not rulesets) - * - Workflow dir: .gitea/workflows + * - Workflow dir: .mokogitea/workflows * * @package MokoStandards\Enterprise * @version 04.06.10 @@ -62,12 +62,12 @@ class GiteaAdapter implements GitPlatformAdapter public function getWorkflowDir(): string { - return '.gitea/workflows'; + return '.mokogitea/workflows'; } public function getMetadataDir(): string { - return '.gitea'; + return '.mokogitea'; } public function getRepoWebUrl(string $org, string $repo): string diff --git a/lib/Enterprise/MokoStandardsParser.php b/lib/Enterprise/MokoStandardsParser.php index 9d6374b..4b45b76 100644 --- a/lib/Enterprise/MokoStandardsParser.php +++ b/lib/Enterprise/MokoStandardsParser.php @@ -25,7 +25,7 @@ use SimpleXMLElement; * MokoStandards Parser * * Reads, writes, and validates the .mokostandards repository manifest. - * The file uses XML format (no file extension) and lives at .gitea/.mokostandards. + * The file uses XML format (no file extension) and lives at .mokogitea/.mokostandards. * * @package MokoStandards\Enterprise * @version 04.07.00 diff --git a/lib/Enterprise/Plugins/ApiPlugin.php b/lib/Enterprise/Plugins/ApiPlugin.php index 2c6baf0..7ce74fa 100644 --- a/lib/Enterprise/Plugins/ApiPlugin.php +++ b/lib/Enterprise/Plugins/ApiPlugin.php @@ -287,7 +287,7 @@ class ApiPlugin extends AbstractProjectPlugin 'docker-compose.yml', 'kubernetes/*.yaml', 'tests/ or test/', - '.gitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', + '.mokogitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', 'middleware/ or middlewares/', ]; } @@ -673,8 +673,8 @@ class ApiPlugin extends AbstractProjectPlugin */ private function hasCICD(string $projectPath): bool { - return $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + return $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, 'Jenkinsfile') || $this->fileExists($projectPath, '.circleci'); diff --git a/lib/Enterprise/Plugins/GenericPlugin.php b/lib/Enterprise/Plugins/GenericPlugin.php index 27297b0..aec9b91 100644 --- a/lib/Enterprise/Plugins/GenericPlugin.php +++ b/lib/Enterprise/Plugins/GenericPlugin.php @@ -73,8 +73,8 @@ class GenericPlugin extends AbstractProjectPlugin } // Check for CI/CD configuration - $hasCICD = $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + $hasCICD = $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, '.travis.yml') || $this->fileExists($projectPath, 'Jenkinsfile') || @@ -275,7 +275,7 @@ class GenericPlugin extends AbstractProjectPlugin 'CONTRIBUTING.md', 'CODE_OF_CONDUCT.md', 'SECURITY.md', - '.gitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', + '.mokogitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', 'docs/ or documentation/', 'tests/ or test/', ]; @@ -359,8 +359,8 @@ class GenericPlugin extends AbstractProjectPlugin */ private function hasCICD(string $projectPath): bool { - return $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + return $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, '.travis.yml') || $this->fileExists($projectPath, 'Jenkinsfile') || diff --git a/lib/Enterprise/Plugins/MobilePlugin.php b/lib/Enterprise/Plugins/MobilePlugin.php index 87048dd..348ec7e 100644 --- a/lib/Enterprise/Plugins/MobilePlugin.php +++ b/lib/Enterprise/Plugins/MobilePlugin.php @@ -337,7 +337,7 @@ class MobilePlugin extends AbstractProjectPlugin 'App icons for all required sizes', 'Splash screen assets', 'tests/ or __tests__/', - '.gitea/workflows/* or .gitea/workflows/* or fastlane/', + '.mokogitea/workflows/* or .gitea/workflows/* or fastlane/', 'React Native: metro.config.js', 'Flutter: analysis_options.yaml', 'iOS: Podfile', @@ -542,8 +542,8 @@ class MobilePlugin extends AbstractProjectPlugin */ private function hasCICD(string $projectPath): bool { - return $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + return $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, 'fastlane') || $this->fileExists($projectPath, '.circleci'); diff --git a/lib/Enterprise/Plugins/NodeJsPlugin.php b/lib/Enterprise/Plugins/NodeJsPlugin.php index 2ee3488..0bd0c28 100644 --- a/lib/Enterprise/Plugins/NodeJsPlugin.php +++ b/lib/Enterprise/Plugins/NodeJsPlugin.php @@ -314,7 +314,7 @@ class NodeJsPlugin extends AbstractProjectPlugin '.nvmrc or .node-version', '.editorconfig', 'jest.config.js or vitest.config.js', - '.gitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', + '.mokogitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', ]; } @@ -511,8 +511,8 @@ class NodeJsPlugin extends AbstractProjectPlugin */ private function hasCICD(string $projectPath): bool { - return $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + return $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, '.travis.yml') || $this->fileExists($projectPath, '.circleci/config.yml'); diff --git a/lib/Enterprise/Plugins/PythonPlugin.php b/lib/Enterprise/Plugins/PythonPlugin.php index c8f6048..e398e36 100644 --- a/lib/Enterprise/Plugins/PythonPlugin.php +++ b/lib/Enterprise/Plugins/PythonPlugin.php @@ -323,7 +323,7 @@ class PythonPlugin extends AbstractProjectPlugin 'pytest.ini or pyproject.toml', '.python-version or .tool-versions', 'Dockerfile', - '.gitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', + '.mokogitea/workflows/* or .gitea/workflows/* or .gitlab-ci.yml', ]; } @@ -532,8 +532,8 @@ class PythonPlugin extends AbstractProjectPlugin */ private function hasCICD(string $projectPath): bool { - return $this->fileExists($projectPath, '.gitea/workflows') || - $this->fileExists($projectPath, '.gitea/workflows') || + return $this->fileExists($projectPath, '.mokogitea/workflows') || + $this->fileExists($projectPath, '.mokogitea/workflows') || $this->fileExists($projectPath, '.gitlab-ci.yml') || $this->fileExists($projectPath, '.travis.yml') || $this->fileExists($projectPath, 'tox.ini'); diff --git a/lib/Enterprise/ProjectMetricsCollector.php b/lib/Enterprise/ProjectMetricsCollector.php index fc9ed07..ab2866e 100644 --- a/lib/Enterprise/ProjectMetricsCollector.php +++ b/lib/Enterprise/ProjectMetricsCollector.php @@ -125,13 +125,13 @@ class ProjectMetricsCollector // CI/CD — check both .github/workflows and .gitea/workflows $hasGithubWf = is_dir("{$path}/.github/workflows"); - $hasGiteaWf = is_dir("{$path}/.gitea/workflows"); + $hasGiteaWf = is_dir("{$path}/.mokogitea/workflows"); $this->collectedMetrics['has_ci_workflows'] = ($hasGithubWf || $hasGiteaWf) ? 1 : 0; $this->collectedMetrics['workflow_count'] = $this->countFiles("{$path}/.github/workflows", '*.yml') + $this->countFiles("{$path}/.github/workflows", '*.yaml') + - $this->countFiles("{$path}/.gitea/workflows", '*.yml') + - $this->countFiles("{$path}/.gitea/workflows", '*.yaml'); + $this->countFiles("{$path}/.mokogitea/workflows", '*.yml') + + $this->countFiles("{$path}/.mokogitea/workflows", '*.yaml'); } private function collectNodeJSMetrics(string $path): void diff --git a/lib/Enterprise/RepositoryHealthChecker.php b/lib/Enterprise/RepositoryHealthChecker.php index a82771c..c437354 100644 --- a/lib/Enterprise/RepositoryHealthChecker.php +++ b/lib/Enterprise/RepositoryHealthChecker.php @@ -175,7 +175,7 @@ class RepositoryHealthChecker // Check both .github/workflows and .gitea/workflows $githubDir = "{$path}/.github/workflows"; - $giteaDir = "{$path}/.gitea/workflows"; + $giteaDir = "{$path}/.mokogitea/workflows"; $hasWorkflowDir = is_dir($githubDir) || is_dir($giteaDir); $workflowDir = is_dir($giteaDir) ? $giteaDir : $githubDir; @@ -212,7 +212,7 @@ class RepositoryHealthChecker // Check for security scanning workflow (CodeQL on GitHub, Trivy on Gitea) $githubWf = "{$path}/.github/workflows"; - $giteaWf = "{$path}/.gitea/workflows"; + $giteaWf = "{$path}/.mokogitea/workflows"; $hasSecurityScan = false; if (is_dir($githubWf)) { $hasSecurityScan = !empty(glob("{$githubWf}/*codeql*.yml")) || !empty(glob("{$githubWf}/*codeql*.yaml")); diff --git a/lib/Enterprise/RepositorySynchronizer.php b/lib/Enterprise/RepositorySynchronizer.php index 747fbb8..0bc8320 100644 --- a/lib/Enterprise/RepositorySynchronizer.php +++ b/lib/Enterprise/RepositorySynchronizer.php @@ -424,7 +424,7 @@ HCL; /** * Read the platform slug from the remote .mokostandards manifest. - * Checks .gitea/.mokostandards, .github/.mokostandards, and root .mokostandards. + * Checks .mokogitea/.mokostandards, .github/.mokostandards, and root .mokostandards. * * @return string|null Platform slug or null if not found/parseable */ @@ -435,7 +435,7 @@ HCL; "{$metaDir}/.mokostandards", '.mokostandards', ]; - if ($metaDir === '.gitea') { + if ($metaDir === '.mokogitea') { $paths[] = '.github/.mokostandards'; } @@ -769,7 +769,7 @@ HCL; * and convert legacy YAML-like format to the new XML manifest. * * Handles: - * 1. Location migration: root or .github/ → .gitea/.mokostandards + * 1. Location migration: root or .github/ → .mokogitea/.mokostandards * 2. Format migration: legacy "platform: xxx" → XML manifest * 3. Update existing XML: refresh timestamp */ @@ -786,7 +786,7 @@ HCL; // ── Collect existing files from all legacy locations ───────── $legacySources = ['.mokostandards']; - if ($metaDir === '.gitea') { + if ($metaDir === '.mokogitea') { $legacySources[] = '.github/.mokostandards'; } diff --git a/lib/Enterprise/UnifiedValidation.php b/lib/Enterprise/UnifiedValidation.php index fffe02d..4a60dd0 100644 --- a/lib/Enterprise/UnifiedValidation.php +++ b/lib/Enterprise/UnifiedValidation.php @@ -275,7 +275,7 @@ class WorkflowValidatorPlugin extends ValidationPlugin public function validate(array $context): ValidationResult { $workflowDir = $context['workflow_dir'] - ?? (is_dir('.gitea/workflows') ? '.gitea/workflows' : '.github/workflows'); + ?? (is_dir('.mokogitea/workflows') ? '.mokogitea/workflows' : '.github/workflows'); if (!is_dir($workflowDir)) { return new ValidationResult($this->name, true, 'No workflows directory'); @@ -286,7 +286,7 @@ class WorkflowValidatorPlugin extends ValidationPlugin glob($workflowDir . '/*.yml') ?: [], glob($workflowDir . '/*.yaml') ?: [] ); - $altDir = ($workflowDir === '.gitea/workflows') ? '.github/workflows' : '.gitea/workflows'; + $altDir = ($workflowDir === '.mokogitea/workflows') ? '.github/workflows' : '.mokogitea/workflows'; if (is_dir($altDir)) { $workflows = array_merge($workflows, glob($altDir . '/*.yml') ?: [], diff --git a/templates/scripts/validate/validate_structure.php b/templates/scripts/validate/validate_structure.php index d5da100..20d4627 100644 --- a/templates/scripts/validate/validate_structure.php +++ b/templates/scripts/validate/validate_structure.php @@ -31,7 +31,7 @@ use MokoEnterprise\CliFramework; * - Required root files present (README.md, CHANGELOG.md, LICENSE, CONTRIBUTING.md, * SECURITY.md, .gitignore, .editorconfig, composer.json) * - Required directories present (src/, docs/, tests/) - * - .gitea/.mokostandards XML governance manifest present + * - .mokogitea/.mokostandards XML governance manifest present * - SPDX-License-Identifier header present in all PHP source files * - No tab characters in YAML/JSON config files * - No Windows path separators in PHP source @@ -73,16 +73,16 @@ class ValidateStructure extends CliFramework // ── Governance attachment ───────────────────────────────────────── $this->section('MokoStandards governance'); - $mokoFile = file_exists("{$path}/.gitea/.mokostandards") + $mokoFile = file_exists("{$path}/.mokogitea/.mokostandards") || file_exists("{$path}/.github/.mokostandards") || file_exists("{$path}/.mokostandards"); - $this->status($mokoFile, '.gitea/.mokostandards (XML manifest)'); + $this->status($mokoFile, '.mokogitea/.mokostandards (XML manifest)'); $mokoFile ? $passed++ : $failed++; // Validate XML format if file exists if ($mokoFile) { - $manifestPath = file_exists("{$path}/.gitea/.mokostandards") - ? "{$path}/.gitea/.mokostandards" + $manifestPath = file_exists("{$path}/.mokogitea/.mokostandards") + ? "{$path}/.mokogitea/.mokostandards" : (file_exists("{$path}/.github/.mokostandards") ? "{$path}/.github/.mokostandards" : "{$path}/.mokostandards"); diff --git a/tests/Enterprise/GitPlatformAdapterTest.php b/tests/Enterprise/GitPlatformAdapterTest.php index 7533874..86fe6e0 100644 --- a/tests/Enterprise/GitPlatformAdapterTest.php +++ b/tests/Enterprise/GitPlatformAdapterTest.php @@ -72,7 +72,7 @@ $giteaAdapter = new GiteaAdapter($giteaClient); assert_true($giteaAdapter instanceof GitPlatformAdapter, 'GiteaAdapter implements GitPlatformAdapter'); assert_true($giteaAdapter->getPlatformName() === 'gitea', 'getPlatformName() returns "gitea"'); assert_true($giteaAdapter->getBaseUrl() === 'https://git.mokoconsulting.tech/api/v1', 'getBaseUrl() returns Gitea API URL'); -assert_true($giteaAdapter->getWorkflowDir() === '.gitea/workflows', 'getWorkflowDir() returns .gitea/workflows'); +assert_true($giteaAdapter->getWorkflowDir() === '.mokogitea/workflows', 'getWorkflowDir() returns .gitea/workflows'); assert_true($giteaAdapter->getApiClient() === $giteaClient, 'getApiClient() returns injected client'); echo "\n"; diff --git a/validate/check_repo_health.php b/validate/check_repo_health.php index c66b82d..c3e93ff 100755 --- a/validate/check_repo_health.php +++ b/validate/check_repo_health.php @@ -133,7 +133,7 @@ class RepoHealthChecker extends CliFramework $cat = 'manifest'; $this->initCategory($cat, 'Manifest & Config', 15); - $this->addCheck($cat, '.gitea/.moko-platform manifest', + $this->addCheck($cat, '.mokogitea/.moko-platform manifest', file_exists("{$p}/.gitea/.moko-platform"), 5); $this->addCheck($cat, 'Workflows directory', is_dir("{$p}/.gitea/workflows") || is_dir("{$p}/.github/workflows"), 5); diff --git a/validate/check_structure.php b/validate/check_structure.php index 6c3c171..d2d789f 100644 --- a/validate/check_structure.php +++ b/validate/check_structure.php @@ -30,7 +30,7 @@ class CheckStructure extends CliFramework private const REQUIRED_DIRS = ['docs', 'scripts']; /** @var list At least one of these workflow directories must exist. */ - private const WORKFLOW_DIRS = ['.github/workflows', '.gitea/workflows']; + private const WORKFLOW_DIRS = ['.github/workflows', '.mokogitea/workflows']; /** @var list Required file paths (relative to repo root). */ private const REQUIRED_FILES = ['README.md', 'LICENSE', 'CONTRIBUTING.md', 'SECURITY.md']; diff --git a/validate/check_version_consistency.php b/validate/check_version_consistency.php index bd167b6..5af06c1 100755 --- a/validate/check_version_consistency.php +++ b/validate/check_version_consistency.php @@ -115,7 +115,7 @@ class CheckVersionConsistency extends CliFramework // Check both .github/workflows and .gitea/workflows $workflowFiles = []; - foreach (['.github/workflows', '.gitea/workflows'] as $wfDir) { + foreach (['.github/workflows', '.mokogitea/workflows'] as $wfDir) { $dir = $path . '/' . $wfDir; if (is_dir($dir)) { $workflowFiles = array_merge($workflowFiles, glob($dir . '/*.yml') ?: []); diff --git a/validate/scan_drift.php b/validate/scan_drift.php index 83eb7ca..36f2f17 100755 --- a/validate/scan_drift.php +++ b/validate/scan_drift.php @@ -269,7 +269,7 @@ class DriftScanner extends CliFramework // Check workflows — scan both .github/workflows and .gitea/workflows $drift = $this->checkFileCategory($org, $repo, 'workflows', '.github/workflows', $drift, $protectedFiles, $syncExclusions); - $drift = $this->checkFileCategory($org, $repo, 'workflows_gitea', '.gitea/workflows', $drift, $protectedFiles, $syncExclusions); + $drift = $this->checkFileCategory($org, $repo, 'workflows_gitea', '.mokogitea/workflows', $drift, $protectedFiles, $syncExclusions); // Check GitHub configs $drift = $this->checkFileCategory($org, $repo, 'github', '.github', $drift, $protectedFiles, $syncExclusions);