From 50f253d444732328d12f89782e02c7e5d7001100 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Tue, 14 Jul 2026 15:56:17 -0500 Subject: [PATCH] chore(rebrand): gitea -> git (MokoGitea -> MokoGit, .mokogitea -> .mokogit) Case-preserving gitea->git across the mokocli monorepo: brand text, functional identifiers (MOKOGITEA_TOKEN, GITEA_URL/ORG/REPO, --gitea-url), and all nested .mokogitea/ dirs (top-level + mcp/servers/*) -> .mokogit/. Protected: literal `.gitea` (upstream workflow-detection paths in the Enterprise plugins) and git.mokoconsulting.tech. WARNING: CI-breaking until the MokoGit server side is reconfigured. Claude-Session: https://claude.ai/code/session_01DQEMmJPe61ya7HDfA6BHP8 --- {.mokogitea => .mokogit}/CLAUDE.md | 8 +- .../ISSUE_TEMPLATE/adr.md | 0 .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/documentation.md | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../ISSUE_TEMPLATE/question.md | 0 .../ISSUE_TEMPLATE/rfc.md | 0 .../ISSUE_TEMPLATE/security.md | 0 .../ISSUE_TEMPLATE/version.md | 0 .../branch-protection.yml | 22 ++--- {.mokogitea => .mokogit}/bulk-repo-sync.yml | 24 ++--- {.mokogitea => .mokogit}/pr-branch-check.yml | 0 {.mokogitea => .mokogit}/renovate.yml | 26 ++--- {.mokogitea => .mokogit}/sync-wikis.yml | 6 +- .../workflows/auto-bump.yml | 14 +-- .../workflows/auto-release.yml | 78 +++++++-------- .../workflows/branch-cleanup.yml | 6 +- .../workflows/cascade-dev.yml | 20 ++-- .../workflows/ci-generic.yml | 6 +- .../workflows/ci-issue-reporter.yml | 18 ++-- .../workflows/cleanup.yml | 24 ++--- .../custom/branch-protection-enforce.yml | 4 +- .../workflows/custom/ci-platform.yml | 12 +-- .../workflows/custom/composer-publish.yml | 12 +-- .../custom/sync-feature-versions.yml | 14 +-- .../workflows/gitleaks.yml | 6 +- .../workflows/issue-branch.yml | 10 +- {.mokogitea => .mokogit}/workflows/notify.yml | 6 +- .../workflows/pr-check.yml | 24 ++--- .../workflows/pre-release.yml | 48 +++++----- .../workflows/rc-revert.yml | 10 +- .../workflows/repo-health.yml | 20 ++-- .../workflows/standards-compliance.yml | 32 +++---- .../workflows/version-set.yml | 6 +- CONTRIBUTING.md | 4 +- README.md | 14 +-- bin/moko | 4 +- cli/branch_protect_org.php | 2 +- cli/branch_rename.php | 4 +- cli/bulk_workflow_push.php | 36 +++---- cli/bulk_workflow_trigger.php | 12 +-- cli/ci_issue_reporter.sh | 38 ++++---- cli/client_dashboard.php | 14 +-- cli/client_inventory.php | 12 +-- cli/client_provision.php | 36 +++---- cli/create_project.php | 10 +- cli/create_repo.php | 8 +- cli/deploy_joomla.php | 6 +- cli/dev_branch_reset.php | 10 +- cli/joomla_metadata_validate.php | 26 ++--- cli/joomla_release.php | 18 ++-- cli/license_manage.php | 10 +- cli/manifest_detect.php | 12 +-- cli/manifest_element.php | 2 +- cli/manifest_integrity.php | 10 +- cli/manifest_licensing.php | 4 +- cli/manifest_read.php | 18 ++-- cli/platform_detect.php | 14 +-- cli/release.php | 4 +- cli/release_body_update.php | 12 +-- cli/release_cascade.php | 22 ++--- cli/release_create.php | 26 ++--- cli/release_manage.php | 32 +++---- cli/release_mirror.php | 38 ++++---- cli/release_package.php | 30 +++--- cli/release_promote.php | 34 +++---- cli/release_publish.php | 32 +++---- cli/release_validate.php | 2 +- cli/repo_wizard.php | 10 +- cli/scaffold_client.php | 28 +++--- cli/theme_vars_check.php | 12 +-- cli/updates_xml_build.php | 20 ++-- cli/updates_xml_sync.php | 32 +++---- cli/version_auto_bump.php | 10 +- cli/version_bump.php | 4 +- cli/version_bump_remote.php | 26 ++--- cli/version_check.php | 10 +- cli/version_read.php | 4 +- cli/version_reset_dev.php | 22 ++--- cli/version_set_platform.php | 6 +- cli/wiki_sync.php | 8 +- cli/workflow_sync.php | 92 +++++++++--------- index.md | 2 +- lib/Enterprise/ApiClient.php | 2 +- lib/Enterprise/Config.php | 20 ++-- lib/Enterprise/GitHubAdapter.php | 2 +- lib/Enterprise/GitPlatformAdapter.php | 20 ++-- lib/Enterprise/ManifestParser.php | 2 +- lib/Enterprise/ManifestReader.php | 10 +- lib/Enterprise/MokoGiteaAdapter.php | 54 +++++------ lib/Enterprise/PlatformAdapterFactory.php | 56 +++++------ 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 | 8 +- lib/Enterprise/RepositoryHealthChecker.php | 16 ++-- lib/Enterprise/RepositorySynchronizer.php | 16 ++-- lib/Enterprise/SourceResolver.php | 10 +- lib/Enterprise/UnifiedValidation.php | 4 +- maintenance/pin_action_shas.php | 2 +- maintenance/repo_inventory.php | 6 +- maintenance/rotate_secrets.php | 4 +- maintenance/setup_labels.php | 2 +- mcp/config.example.json | 4 +- .../{.mokogitea => .mokogit}/CLAUDE.md | 8 +- .../workflows/pr-check.yml | 12 +-- mcp/servers/mokobackup/README.md | 2 +- .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- mcp/servers/mokocrm_api/CHANGELOG.md | 2 +- mcp/servers/mokocrm_api/CONTRIBUTING.md | 4 +- mcp/servers/mokocrm_api/README.md | 2 +- mcp/servers/mokocrm_api/SECURITY.md | 2 +- .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- .../mokogitea_skill/commands/deploy.md | 4 +- .../mokogitea_skill/commands/mcp-rebuild.md | 2 +- .../mokogitea_skill/commands/new-client.md | 18 ++-- .../mokogitea_skill/commands/release.md | 12 +-- .../mokogitea_skill/commands/server-health.md | 6 +- .../mokogitea_skill/skills/mokogitea/SKILL.md | 96 +++++++++---------- .../{.mokogitea => .mokogit}/.moko-cli | 0 .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- .../ISSUE_TEMPLATE/mcp_api_integration.md | 0 .../ISSUE_TEMPLATE/mcp_connection_issue.md | 0 .../ISSUE_TEMPLATE/mcp_tool_request.md | 0 .../workflows/deploy-manual.yml | 0 .../workflows/gitleaks.yml | 4 +- .../workflows/pr-branch-check.yml | 0 .../workflows/repo-health.yml | 8 +- mcp/servers/mokomonitor/README.md | 2 +- .../{.mokogitea => .mokogit}/.moko-cli | 0 .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- .../ISSUE_TEMPLATE/mcp_api_integration.md | 0 .../ISSUE_TEMPLATE/mcp_connection_issue.md | 0 .../ISSUE_TEMPLATE/mcp_tool_request.md | 0 .../workflows/deploy-manual.yml | 0 .../.mokogit/workflows}/gitleaks.yml | 4 +- .../workflows/pr-branch-check.yml | 0 .../.mokogit}/workflows/repo-health.yml | 8 +- mcp/servers/mokomonitor/src/index.ts | 6 +- mcp/servers/mokossh/.env.example | 12 +-- .../{.mokogitea => .mokogit}/.mokostandards | 0 .../{.mokogitea => .mokogit}/CLAUDE.md | 2 +- .../ISSUE_TEMPLATE/adr.md | 0 .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/documentation.md | 0 .../ISSUE_TEMPLATE/enterprise_support.md | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../ISSUE_TEMPLATE/firewall-request.md | 0 .../ISSUE_TEMPLATE/mcp_api_integration.md | 0 .../ISSUE_TEMPLATE/mcp_connection_issue.md | 0 .../ISSUE_TEMPLATE/mcp_tool_request.md | 0 .../ISSUE_TEMPLATE/question.md | 0 .../ISSUE_TEMPLATE/rfc.md | 0 .../ISSUE_TEMPLATE/security.md | 0 .../ISSUE_TEMPLATE/version.md | 0 .../pr-branch-check.yml | 0 .../workflows/auto-assign.yml | 2 +- .../.mokogit}/workflows/auto-dev-issue.yml | 2 +- .../workflows/auto-release.yml | 94 +++++++++--------- .../workflows/cascade-dev.yml | 18 ++-- .../workflows/changelog-validation.yml | 2 +- .../workflows/cleanup.yml | 14 +-- .../.mokogit}/workflows/codeql-analysis.yml | 2 +- .../workflows/copilot-agent.yml | 0 .../.mokogit}/workflows/deploy-manual.yml | 10 +- .../workflows/enterprise-firewall-setup.yml | 0 .../.mokogit}/workflows/gitleaks.yml | 4 +- .../workflows/mcp-auto-release.yml | 0 .../workflows/mcp-build-test.yml | 0 .../workflows/mcp-sdk-check.yml | 0 .../workflows/mcp-tool-inventory.yml | 0 .../.mokogit}/workflows/notify.yml | 4 +- .../workflows/pr-check.yml | 6 +- .../.mokogit}/workflows/pre-release.yml | 38 ++++---- .../workflows/repo-health.yml | 8 +- .../workflows/repository-cleanup.yml | 2 +- .../workflows/security-audit.yml | 4 +- .../workflows/standards-compliance.yml | 2 +- .../workflows/sync-version-on-merge.yml | 2 +- mcp/servers/mokossh/README.md | 2 +- .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- .../ISSUE_TEMPLATE/adr.md | 0 .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/documentation.md | 0 .../ISSUE_TEMPLATE/enterprise_support.md | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../ISSUE_TEMPLATE/firewall-request.md | 0 .../ISSUE_TEMPLATE/mcp_api_integration.md | 0 .../ISSUE_TEMPLATE/mcp_connection_issue.md | 0 .../ISSUE_TEMPLATE/mcp_tool_request.md | 0 .../ISSUE_TEMPLATE/question.md | 0 .../ISSUE_TEMPLATE/rfc.md | 0 .../ISSUE_TEMPLATE/security.md | 0 .../ISSUE_TEMPLATE/version.md | 0 .../{.mokogitea => .mokogit}/auto-assign.yml | 0 .../auto-dev-issue.yml | 0 .../{.mokogitea => .mokogit}/auto-release.yml | 0 .../{.mokogitea => .mokogit}/cascade-dev.yml | 18 ++-- .../changelog-validation.yml | 0 .../codeql-analysis.yml | 0 .../copilot-agent.yml | 0 .../{.mokogitea => .mokogit}/deploy-demo.yml | 0 .../{.mokogitea => .mokogit}/deploy-dev.yml | 0 .../enterprise-firewall-setup.yml | 0 .../.mokogit}/gitleaks.yml | 4 +- .../{.mokogitea => .mokogit}/manifest.xml | 0 .../mcp-auto-release.yml | 0 .../mcp-build-test.yml | 0 .../mcp-sdk-check.yml | 0 .../mcp-tool-inventory.yml | 0 .../pr-branch-check.yml | 0 .../repository-cleanup.yml | 0 .../standards-compliance.yml | 0 .../sync-version-on-merge.yml | 0 .../.mokogit}/workflows/auto-assign.yml | 2 +- .../workflows/auto-dev-issue.yml | 2 +- .../workflows/auto-release.yml | 94 +++++++++--------- .../workflows/cascade-dev.yml | 18 ++-- .../workflows/changelog-validation.yml | 2 +- .../workflows/cleanup.yml | 14 +-- .../.mokogit}/workflows/codeql-analysis.yml | 2 +- .../workflows/copilot-agent.yml | 0 .../.mokogit}/workflows/deploy-manual.yml | 10 +- .../workflows/enterprise-firewall-setup.yml | 0 .../.mokogit}/workflows/gitleaks.yml | 4 +- .../workflows/mcp-auto-release.yml | 0 .../workflows/mcp-build-test.yml | 0 .../workflows/mcp-sdk-check.yml | 0 .../workflows/mcp-tool-inventory.yml | 0 .../.mokogit}/workflows/notify.yml | 4 +- .../workflows/pr-check.yml | 6 +- .../.mokogit}/workflows/pre-release.yml | 38 ++++---- .../workflows/repo-health.yml | 8 +- .../workflows/repository-cleanup.yml | 2 +- .../workflows/security-audit.yml | 4 +- .../workflows/standards-compliance.yml | 2 +- .../workflows/sync-version-on-merge.yml | 2 +- mcp/servers/mokosuite_api/CONTRIBUTING.md | 4 +- mcp/servers/mokosuite_api/README.md | 2 +- mcp/servers/mokosuite_api/SECURITY.md | 2 +- .../{.mokogitea => .mokogit}/CLAUDE.md | 4 +- .../ISSUE_TEMPLATE/adr.md | 0 .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/documentation.md | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../ISSUE_TEMPLATE/mcp_api_integration.md | 0 .../ISSUE_TEMPLATE/mcp_connection_issue.md | 0 .../ISSUE_TEMPLATE/mcp_tool_request.md | 0 .../ISSUE_TEMPLATE/question.md | 0 .../ISSUE_TEMPLATE/rfc.md | 0 .../ISSUE_TEMPLATE/security.md | 0 .../ISSUE_TEMPLATE/version.md | 0 .../{.mokogitea => .mokogit}/manifest.xml | 0 .../.mokogit}/workflows/auto-assign.yml | 2 +- .../.mokogit}/workflows/auto-dev-issue.yml | 2 +- .../workflows/auto-release.yml | 94 +++++++++--------- .../workflows/cascade-dev.yml | 18 ++-- .../workflows/changelog-validation.yml | 2 +- .../workflows/cleanup.yml | 14 +-- .../.mokogit}/workflows/codeql-analysis.yml | 2 +- .../workflows/copilot-agent.yml | 0 .../workflows/deploy-manual.yml | 10 +- .../workflows/enterprise-firewall-setup.yml | 0 .../workflows/gitleaks.yml | 4 +- .../workflows/mcp-auto-release.yml | 0 .../workflows/mcp-build-test.yml | 0 .../workflows/mcp-sdk-check.yml | 0 .../workflows/mcp-tool-inventory.yml | 0 .../workflows/notify.yml | 6 +- .../workflows/pr-check.yml | 2 +- .../workflows/pre-release.yml | 48 +++++----- .../workflows/repo-health.yml | 8 +- .../workflows/repository-cleanup.yml | 2 +- .../workflows/security-audit.yml | 6 +- .../workflows/standards-compliance.yml | 2 +- .../workflows/sync-version-on-merge.yml | 2 +- mcp/src/config.ts | 4 +- mcp/src/index.ts | 2 +- mcp/src/types.ts | 8 +- phpstan-baseline.neon | 24 ++--- scripts/cleanup-claude-dirs.sh | 30 +++--- scripts/sync-wikis-to-github.sh | 38 ++++---- tests/Enterprise/GitPlatformAdapterTest.php | 50 +++++----- tests/Unit/VersionBumpTest.php | 6 +- validate/check_composer_deps.php | 4 +- validate/check_repo_health.php | 14 +-- validate/check_structure.php | 2 +- validate/check_version_consistency.php | 2 +- validate/check_wiki_health.php | 14 +-- validate/scan_drift.php | 2 +- 296 files changed, 1347 insertions(+), 1347 deletions(-) rename {.mokogitea => .mokogit}/CLAUDE.md (91%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/adr.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/bug_report.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/config.yml (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/documentation.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/feature_request.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/question.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/rfc.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/security.md (100%) rename {.mokogitea => .mokogit}/ISSUE_TEMPLATE/version.md (100%) rename {.mokogitea => .mokogit}/branch-protection.yml (93%) rename {.mokogitea => .mokogit}/bulk-repo-sync.yml (86%) rename {.mokogitea => .mokogit}/pr-branch-check.yml (100%) rename {.mokogitea => .mokogit}/renovate.yml (86%) rename {.mokogitea => .mokogit}/sync-wikis.yml (82%) rename {.mokogitea => .mokogit}/workflows/auto-bump.yml (80%) rename {.mokogitea => .mokogit}/workflows/auto-release.yml (88%) rename {.mokogitea => .mokogit}/workflows/branch-cleanup.yml (90%) rename {.mokogitea => .mokogit}/workflows/cascade-dev.yml (93%) rename {.mokogitea => .mokogit}/workflows/ci-generic.yml (97%) rename {.mokogitea => .mokogit}/workflows/ci-issue-reporter.yml (75%) rename {.mokogitea => .mokogit}/workflows/cleanup.yml (80%) rename {.mokogitea => .mokogit}/workflows/custom/branch-protection-enforce.yml (93%) rename {.mokogitea => .mokogit}/workflows/custom/ci-platform.yml (98%) rename {.mokogitea => .mokogit}/workflows/custom/composer-publish.yml (85%) rename {.mokogitea => .mokogit}/workflows/custom/sync-feature-versions.yml (87%) rename {.mokogitea => .mokogit}/workflows/gitleaks.yml (96%) rename {.mokogitea => .mokogit}/workflows/issue-branch.yml (88%) rename {.mokogitea => .mokogit}/workflows/notify.yml (94%) rename {.mokogitea => .mokogit}/workflows/pr-check.yml (95%) rename {.mokogitea => .mokogit}/workflows/pre-release.yml (86%) rename {.mokogitea => .mokogit}/workflows/rc-revert.yml (90%) rename {.mokogitea => .mokogit}/workflows/repo-health.yml (98%) rename {.mokogitea => .mokogit}/workflows/standards-compliance.yml (98%) rename {.mokogitea => .mokogit}/workflows/version-set.yml (96%) rename mcp/servers/mokobackup/{.mokogitea => .mokogit}/CLAUDE.md (86%) rename mcp/servers/mokobackup/{.mokogitea => .mokogit}/workflows/pr-check.yml (93%) rename mcp/servers/mokocrm_api/{.mokogitea => .mokogit}/CLAUDE.md (90%) rename mcp/servers/mokodreamhost/{.mokogitea => .mokogit}/CLAUDE.md (89%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/.moko-cli (100%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/CLAUDE.md (91%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_api_integration.md (100%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_connection_issue.md (100%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_tool_request.md (100%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/workflows/deploy-manual.yml (100%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/workflows/gitleaks.yml (97%) rename mcp/servers/mokomonitor/{.mokogitea => .mokogit}/workflows/pr-branch-check.yml (100%) rename mcp/servers/mokomonitor/{mcp_mokomonitor/.mokogitea => .mokogit}/workflows/repo-health.yml (99%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/.moko-cli (100%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/CLAUDE.md (91%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_api_integration.md (100%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_connection_issue.md (100%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_tool_request.md (100%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/workflows/deploy-manual.yml (100%) rename mcp/servers/{mokosuite_api/.mokogitea => mokomonitor/mcp_mokomonitor/.mokogit/workflows}/gitleaks.yml (97%) rename mcp/servers/mokomonitor/mcp_mokomonitor/{.mokogitea => .mokogit}/workflows/pr-branch-check.yml (100%) rename mcp/servers/mokomonitor/{.mokogitea => mcp_mokomonitor/.mokogit}/workflows/repo-health.yml (99%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/.mokostandards (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/CLAUDE.md (97%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/adr.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/bug_report.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/config.yml (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/documentation.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/enterprise_support.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/feature_request.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/firewall-request.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_api_integration.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_connection_issue.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_tool_request.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/question.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/rfc.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/security.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/version.md (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/pr-branch-check.yml (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/auto-assign.yml (98%) rename mcp/servers/{windows/.mokogitea => mokossh/.mokogit}/workflows/auto-dev-issue.yml (98%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/auto-release.yml (91%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/cascade-dev.yml (92%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/changelog-validation.yml (97%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/cleanup.yml (86%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/codeql-analysis.yml (97%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/copilot-agent.yml (100%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/deploy-manual.yml (92%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/enterprise-firewall-setup.yml (100%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/gitleaks.yml (97%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/mcp-auto-release.yml (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/mcp-build-test.yml (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/mcp-sdk-check.yml (100%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/mcp-tool-inventory.yml (100%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/notify.yml (96%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/pr-check.yml (97%) rename mcp/servers/{mokosuite_api/.mokogitea => mokossh/.mokogit}/workflows/pre-release.yml (87%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/repo-health.yml (99%) rename mcp/servers/{windows/.mokogitea => mokossh/.mokogit}/workflows/repository-cleanup.yml (99%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/security-audit.yml (97%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/standards-compliance.yml (99%) rename mcp/servers/mokossh/{.mokogitea => .mokogit}/workflows/sync-version-on-merge.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/CLAUDE.md (90%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/adr.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/bug_report.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/config.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/documentation.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/enterprise_support.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/feature_request.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/firewall-request.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_api_integration.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_connection_issue.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_tool_request.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/question.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/rfc.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/security.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/version.md (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/auto-assign.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/auto-dev-issue.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/auto-release.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/cascade-dev.yml (92%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/changelog-validation.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/codeql-analysis.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/copilot-agent.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/deploy-demo.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/deploy-dev.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/enterprise-firewall-setup.yml (100%) rename mcp/servers/{mokomonitor/mcp_mokomonitor/.mokogitea/workflows => mokosuite_api/.mokogit}/gitleaks.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/manifest.xml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/mcp-auto-release.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/mcp-build-test.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/mcp-sdk-check.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/mcp-tool-inventory.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/pr-branch-check.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/repository-cleanup.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/standards-compliance.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/sync-version-on-merge.yml (100%) rename mcp/servers/{windows/.mokogitea => mokosuite_api/.mokogit}/workflows/auto-assign.yml (98%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/auto-dev-issue.yml (98%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/auto-release.yml (91%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/cascade-dev.yml (92%) rename mcp/servers/{mokossh/.mokogitea => mokosuite_api/.mokogit}/workflows/changelog-validation.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/cleanup.yml (86%) rename mcp/servers/{windows/.mokogitea => mokosuite_api/.mokogit}/workflows/codeql-analysis.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/copilot-agent.yml (100%) rename mcp/servers/{mokossh/.mokogitea => mokosuite_api/.mokogit}/workflows/deploy-manual.yml (92%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/enterprise-firewall-setup.yml (100%) rename mcp/servers/{mokossh/.mokogitea => mokosuite_api/.mokogit}/workflows/gitleaks.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/mcp-auto-release.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/mcp-build-test.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/mcp-sdk-check.yml (100%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/mcp-tool-inventory.yml (100%) rename mcp/servers/{mokossh/.mokogitea => mokosuite_api/.mokogit}/workflows/notify.yml (96%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/pr-check.yml (97%) rename mcp/servers/{mokossh/.mokogitea => mokosuite_api/.mokogit}/workflows/pre-release.yml (87%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/repo-health.yml (99%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/repository-cleanup.yml (99%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/security-audit.yml (97%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/standards-compliance.yml (99%) rename mcp/servers/mokosuite_api/{.mokogitea => .mokogit}/workflows/sync-version-on-merge.yml (97%) rename mcp/servers/windows/{.mokogitea => .mokogit}/CLAUDE.md (89%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/adr.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/bug_report.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/config.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/documentation.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/feature_request.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_api_integration.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_connection_issue.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/mcp_tool_request.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/question.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/rfc.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/security.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/ISSUE_TEMPLATE/version.md (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/manifest.xml (100%) rename mcp/servers/{mokosuite_api/.mokogitea => windows/.mokogit}/workflows/auto-assign.yml (98%) rename mcp/servers/{mokossh/.mokogitea => windows/.mokogit}/workflows/auto-dev-issue.yml (98%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/auto-release.yml (91%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/cascade-dev.yml (93%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/changelog-validation.yml (97%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/cleanup.yml (86%) rename mcp/servers/{mokossh/.mokogitea => windows/.mokogit}/workflows/codeql-analysis.yml (97%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/copilot-agent.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/deploy-manual.yml (91%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/enterprise-firewall-setup.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/gitleaks.yml (97%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/mcp-auto-release.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/mcp-build-test.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/mcp-sdk-check.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/mcp-tool-inventory.yml (100%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/notify.yml (94%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/pr-check.yml (99%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/pre-release.yml (89%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/repo-health.yml (99%) rename mcp/servers/{mokossh/.mokogitea => windows/.mokogit}/workflows/repository-cleanup.yml (99%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/security-audit.yml (94%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/standards-compliance.yml (99%) rename mcp/servers/windows/{.mokogitea => .mokogit}/workflows/sync-version-on-merge.yml (97%) diff --git a/.mokogitea/CLAUDE.md b/.mokogit/CLAUDE.md similarity index 91% rename from .mokogitea/CLAUDE.md rename to .mokogit/CLAUDE.md index e719206..0ab6eae 100644 --- a/.mokogitea/CLAUDE.md +++ b/.mokogit/CLAUDE.md @@ -38,7 +38,7 @@ composer check # Run all checks | `lib/Enterprise/Plugins/` | 11 platform plugins (Joomla, Dolibarr, Node.js, Python, etc.) | | `deploy/` | SFTP deployment scripts (Joomla, Dolibarr, health checks) | | `templates/` | Universal templates, configs, governance schema | -| `.mokogitea/workflows/` | CI/CD workflows (MokoGitea Actions) | +| `.mokogit/workflows/` | CI/CD workflows (MokoGit Actions) | | `bin/moko` | Unified CLI dispatcher — `php bin/moko ` | | `monitoring/sites.json` | Sites list for mcp_mokomonitor | @@ -50,7 +50,7 @@ After adding a CLI tool, register it in `bin/moko` COMMAND_MAP. ### Platform Adapters -- `MokoGiteaAdapter` — git.mokoconsulting.tech (primary) +- `MokoGitAdapter` — git.mokoconsulting.tech (primary) - `GitHubAdapter` — github.com mirrors ### Plugin System @@ -70,7 +70,7 @@ PHPStan runs with `--memory-limit=512M`. CI enforces PHPCS errors; PHPStan is `c - **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js` - **Attribution**: `Authored-by: Moko Consulting` -- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`) -- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files +- **Workflow directory**: `.mokogit/` (not `.gitea/` or `.github/`) +- **Wiki**: documentation lives in the MokoGit wiki, not `docs/` files - **New CLI tools**: extend `CliFramework`, not `CLIApp` (legacy) - **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) diff --git a/.mokogitea/ISSUE_TEMPLATE/adr.md b/.mokogit/ISSUE_TEMPLATE/adr.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/adr.md rename to .mokogit/ISSUE_TEMPLATE/adr.md diff --git a/.mokogitea/ISSUE_TEMPLATE/bug_report.md b/.mokogit/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/bug_report.md rename to .mokogit/ISSUE_TEMPLATE/bug_report.md diff --git a/.mokogitea/ISSUE_TEMPLATE/config.yml b/.mokogit/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/config.yml rename to .mokogit/ISSUE_TEMPLATE/config.yml diff --git a/.mokogitea/ISSUE_TEMPLATE/documentation.md b/.mokogit/ISSUE_TEMPLATE/documentation.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/documentation.md rename to .mokogit/ISSUE_TEMPLATE/documentation.md diff --git a/.mokogitea/ISSUE_TEMPLATE/feature_request.md b/.mokogit/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/feature_request.md rename to .mokogit/ISSUE_TEMPLATE/feature_request.md diff --git a/.mokogitea/ISSUE_TEMPLATE/question.md b/.mokogit/ISSUE_TEMPLATE/question.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/question.md rename to .mokogit/ISSUE_TEMPLATE/question.md diff --git a/.mokogitea/ISSUE_TEMPLATE/rfc.md b/.mokogit/ISSUE_TEMPLATE/rfc.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/rfc.md rename to .mokogit/ISSUE_TEMPLATE/rfc.md diff --git a/.mokogitea/ISSUE_TEMPLATE/security.md b/.mokogit/ISSUE_TEMPLATE/security.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/security.md rename to .mokogit/ISSUE_TEMPLATE/security.md diff --git a/.mokogitea/ISSUE_TEMPLATE/version.md b/.mokogit/ISSUE_TEMPLATE/version.md similarity index 100% rename from .mokogitea/ISSUE_TEMPLATE/version.md rename to .mokogit/ISSUE_TEMPLATE/version.md diff --git a/.mokogitea/branch-protection.yml b/.mokogit/branch-protection.yml similarity index 93% rename from .mokogitea/branch-protection.yml rename to .mokogit/branch-protection.yml index 25ab04d..9596cea 100644 --- a/.mokogitea/branch-protection.yml +++ b/.mokogit/branch-protection.yml @@ -1,7 +1,7 @@ # Copyright (C) 2026 Moko Consulting # SPDX-License-Identifier: GPL-3.0-or-later # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.gitea/workflows/branch-protection.yml @@ -42,8 +42,8 @@ on: default: '' env: - GITEA_URL: https://git.mokoconsulting.tech - GITEA_ORG: MokoConsulting + GIT_URL: https://git.mokoconsulting.tech + GIT_ORG: MokoConsulting permissions: contents: read @@ -57,12 +57,12 @@ jobs: - name: Determine target repos id: repos env: - GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | - API="${GITEA_URL}/api/v1" + API="${GIT_URL}/api/v1" # Platform/standards/infra repos to exclude - EXCLUDE="gitea-org-config org-profile gitea-private .mokogitea-private mokocli MokoTesting" + EXCLUDE="git-org-config org-profile git-private .mokogit-private mokocli MokoTesting" EXCLUDE="$EXCLUDE MokoCli-Template-Client MokoCli-Template-Dolibarr MokoCli-Template-Generic MokoCli-Template-Joomla MokoDoliProjTemplate" if [ -n "${{ inputs.repos }}" ]; then @@ -75,7 +75,7 @@ jobs: while true; do BATCH=$(curl -sS \ -H "Authorization: token ${GA_TOKEN}" \ - "${API}/orgs/${GITEA_ORG}/repos?page=${PAGE}&limit=50" \ + "${API}/orgs/${GIT_ORG}/repos?page=${PAGE}&limit=50" \ | jq -r '.[].name // empty') [ -z "$BATCH" ] && break REPOS="$REPOS $BATCH" @@ -105,10 +105,10 @@ jobs: - name: Apply protection rules env: - GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} DRY_RUN: ${{ inputs.dry_run || 'false' }} run: | - API="${GITEA_URL}/api/v1" + API="${GIT_URL}/api/v1" REPOS="${{ steps.repos.outputs.repos }}" SUCCESS=0 @@ -222,7 +222,7 @@ jobs: curl -sS -o /dev/null -w "" \ -X DELETE \ -H "Authorization: token ${GA_TOKEN}" \ - "${API}/repos/${GITEA_ORG}/${REPO}/branch_protections/${ENCODED_NAME}" 2>/dev/null || true + "${API}/repos/${GIT_ORG}/${REPO}/branch_protections/${ENCODED_NAME}" 2>/dev/null || true # Create rule RESPONSE=$(curl -sS -w "\n%{http_code}" \ @@ -230,7 +230,7 @@ jobs: -H "Authorization: token ${GA_TOKEN}" \ -H "Content-Type: application/json" \ -d "$RULE" \ - "${API}/repos/${GITEA_ORG}/${REPO}/branch_protections") + "${API}/repos/${GIT_ORG}/${REPO}/branch_protections") HTTP=$(echo "$RESPONSE" | tail -1) BODY=$(echo "$RESPONSE" | sed '$d') diff --git a/.mokogitea/bulk-repo-sync.yml b/.mokogit/bulk-repo-sync.yml similarity index 86% rename from .mokogitea/bulk-repo-sync.yml rename to .mokogit/bulk-repo-sync.yml index 521616b..a5ca78d 100644 --- a/.mokogitea/bulk-repo-sync.yml +++ b/.mokogit/bulk-repo-sync.yml @@ -1,7 +1,7 @@ # Copyright (C) 2026 Moko Consulting # SPDX-License-Identifier: GPL-3.0-or-later # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.gitea/workflows/bulk-repo-sync.yml @@ -64,7 +64,7 @@ jobs: id: args run: | ARGS="--org MokoConsulting" - if [ "${{ inputs.dry_run }}" = "true" ] || [ "${{ gitea.event_name }}" = "schedule" ]; then + if [ "${{ inputs.dry_run }}" = "true" ] || [ "${{ git.event_name }}" = "schedule" ]; then ARGS="$ARGS --dry-run" fi if [ -n "${{ inputs.repos }}" ]; then @@ -84,18 +84,18 @@ jobs: echo "Running: php automation/bulk_sync.php ${{ steps.args.outputs.args }}" php automation/bulk_sync.php ${{ steps.args.outputs.args }} 2>&1 | tee /tmp/bulk_sync.log env: - GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} GH_TOKEN: ${{ secrets.GH_PAT }} - GIT_PLATFORM: gitea - GITEA_URL: https://git.mokoconsulting.tech - GITEA_ORG: MokoConsulting + GIT_PLATFORM: git + GIT_URL: https://git.mokoconsulting.tech + GIT_ORG: MokoConsulting - name: Commit Updated Definitions if: success() && inputs.dry_run != 'true' run: | if [ -n "$(git status --porcelain definitions/sync/)" ]; then - git config user.name "gitea-actions[bot]" - git config user.email "gitea-actions[bot]@git.mokoconsulting.tech" + git config user.name "git-actions[bot]" + git config user.email "git-actions[bot]@git.mokoconsulting.tech" git add definitions/sync/*.def.tf git commit -m "chore: update synced repository definitions" || true git push || true @@ -112,9 +112,9 @@ jobs: bash automation/enforce_tags.sh || echo "Tag enforcement had errors (non-fatal)" fi env: - GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} - GITEA_URL: https://git.mokoconsulting.tech - GITEA_ORG: MokoConsulting + GA_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} + GIT_URL: https://git.mokoconsulting.tech + GIT_ORG: MokoConsulting - name: Upload Sync Log if: always() && github.server_url == 'https://github.com' @@ -124,7 +124,7 @@ jobs: path: /tmp/bulk_sync.log retention-days: 30 - - name: Log Summary (Gitea) + - name: Log Summary (Git) if: always() && github.server_url != 'https://github.com' run: | if [ -f /tmp/bulk_sync.log ]; then diff --git a/.mokogitea/pr-branch-check.yml b/.mokogit/pr-branch-check.yml similarity index 100% rename from .mokogitea/pr-branch-check.yml rename to .mokogit/pr-branch-check.yml diff --git a/.mokogitea/renovate.yml b/.mokogit/renovate.yml similarity index 86% rename from .mokogitea/renovate.yml rename to .mokogit/renovate.yml index 31179f3..daa6714 100644 --- a/.mokogitea/renovate.yml +++ b/.mokogit/renovate.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.gitea/workflows/renovate.yml @@ -41,8 +41,8 @@ on: default: false env: - GITEA_URL: https://git.mokoconsulting.tech - GITEA_ORG: MokoConsulting + GIT_URL: https://git.mokoconsulting.tech + GIT_ORG: MokoConsulting RENOVATE_VERSION: '39' permissions: @@ -57,11 +57,11 @@ jobs: - name: Determine target repos id: repos env: - GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | - API="${GITEA_URL}/api/v1" + API="${GIT_URL}/api/v1" - EXCLUDE="gitea-org-config org-profile gitea-private .mokogitea-private mokocli MokoTesting" + EXCLUDE="git-org-config org-profile git-private .mokogit-private mokocli MokoTesting" EXCLUDE="$EXCLUDE MokoCli-Template-Client MokoCli-Template-Dolibarr MokoCli-Template-Generic MokoCli-Template-Joomla MokoDoliProjTemplate" if [ -n "${{ inputs.repos }}" ]; then @@ -72,7 +72,7 @@ jobs: while true; do BATCH=$(curl -sS \ -H "Authorization: token ${GA_TOKEN}" \ - "${API}/orgs/${GITEA_ORG}/repos?page=${PAGE}&limit=50" \ + "${API}/orgs/${GIT_ORG}/repos?page=${PAGE}&limit=50" \ | jq -r '.[].name // empty') [ -z "$BATCH" ] && break REPOS="$REPOS $BATCH" @@ -94,9 +94,9 @@ jobs: REPO_LIST="" for REPO in $REPOS; do if [ -n "$REPO_LIST" ]; then - REPO_LIST="${REPO_LIST},${GITEA_ORG}/${REPO}" + REPO_LIST="${REPO_LIST},${GIT_ORG}/${REPO}" else - REPO_LIST="${GITEA_ORG}/${REPO}" + REPO_LIST="${GIT_ORG}/${REPO}" fi done @@ -107,8 +107,8 @@ jobs: - name: Run Renovate if: steps.repos.outputs.repo_list != '' env: - RENOVATE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} - RENOVATE_PLATFORM: gitea + RENOVATE_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} + RENOVATE_PLATFORM: git RENOVATE_ENDPOINT: ${{ env.GITEA_URL }}/api/v1 RENOVATE_GIT_AUTHOR: 'Renovate Bot ' RENOVATE_REPOSITORIES: ${{ steps.repos.outputs.repo_list }} @@ -116,8 +116,8 @@ jobs: LOG_LEVEL: info run: | npx --yes renovate@${RENOVATE_VERSION} \ - --platform=gitea \ - --endpoint="${GITEA_URL}/api/v1" \ + --platform=git \ + --endpoint="${GIT_URL}/api/v1" \ --token="${RENOVATE_TOKEN}" \ --git-author="Renovate Bot " \ --autodiscover=false \ diff --git a/.mokogitea/sync-wikis.yml b/.mokogit/sync-wikis.yml similarity index 82% rename from .mokogitea/sync-wikis.yml rename to .mokogit/sync-wikis.yml index ab2e97f..6945381 100644 --- a/.mokogitea/sync-wikis.yml +++ b/.mokogit/sync-wikis.yml @@ -3,11 +3,11 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.Maintenance # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.gitea/workflows/sync-wikis.yml -# BRIEF: Daily sync of all Gitea wikis to consolidated GitHub wiki repo +# BRIEF: Daily sync of all Git wikis to consolidated GitHub wiki repo name: Sync Wikis to GitHub @@ -32,7 +32,7 @@ jobs: - name: Sync all wikis env: GH_TOKEN: ${{ secrets.GH_PAT }} - GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + GIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | if [ -z "$GH_TOKEN" ]; then echo "::error::GH_TOKEN secret not set" diff --git a/.mokogitea/workflows/auto-bump.yml b/.mokogit/workflows/auto-bump.yml similarity index 80% rename from .mokogitea/workflows/auto-bump.yml rename to .mokogit/workflows/auto-bump.yml index b58ea7d..63fbf7d 100644 --- a/.mokogitea/workflows/auto-bump.yml +++ b/.mokogit/workflows/auto-bump.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Release # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/auto-bump.yml +# PATH: /.mokogit/workflows/auto-bump.yml # VERSION: 09.02.00 # BRIEF: Auto patch-bump version on every push to dev (skips merge commits) @@ -22,7 +22,7 @@ on: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} permissions: contents: write @@ -41,7 +41,7 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} fetch-depth: 1 - name: Setup MokoCLI tools @@ -53,7 +53,7 @@ jobs: echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV" else git clone --depth 1 --branch main --quiet \ - "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \ + "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \ /tmp/mokocli cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV" @@ -63,5 +63,5 @@ jobs: run: | php ${MOKO_CLI}/version_auto_bump.php \ --path . --branch "${GITHUB_REF_NAME}" \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" \ - --repo-url "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" + --token "${{ secrets.MOKOGIT_TOKEN }}" \ + --repo-url "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogit/workflows/auto-release.yml similarity index 88% rename from .mokogitea/workflows/auto-release.yml rename to .mokogit/workflows/auto-release.yml index efe0303..e2fe39f 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogit/workflows/auto-release.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Release # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/auto-release.yml +# PATH: /.mokogit/workflows/auto-release.yml # VERSION: 05.01.00 # BRIEF: Universal build & release � detects platform from metadata API # @@ -31,7 +31,7 @@ on: branches: - main paths-ignore: - - '.mokogitea/workflows/**' + - '.mokogit/workflows/**' - '*.md' - 'wiki/**' - '.editorconfig' @@ -52,9 +52,9 @@ on: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} - GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} - GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + GIT_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} + GIT_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} permissions: contents: write @@ -77,13 +77,13 @@ jobs: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} fetch-depth: 1 submodules: recursive - name: Setup MokoCLI tools env: - MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKO_CLONE_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting run: | if [ -f /opt/mokocli/cli/version_bump.php ] && [ -f /opt/mokocli/vendor/autoload.php ]; then @@ -104,8 +104,8 @@ jobs: - name: Rename branch to rc run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - AUTH="Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + AUTH="Authorization: token ${{ secrets.MOKOGIT_TOKEN }}" FROM="${{ github.event.pull_request.head.ref || 'dev' }}" PR="${{ github.event.pull_request.number }}" @@ -115,12 +115,12 @@ jobs: SRC_SHA=$(printf '%s' "$SRC_JSON" | python3 -c "import sys, json; print(json.load(sys.stdin)['commit']['id'])" 2>/dev/null || true) [ -n "$SRC_SHA" ] || { echo "::error::Could not resolve HEAD of ${FROM}"; exit 1; } - # Point rc at the source commit via git push. Gitea's git/refs PATCH API + # Point rc at the source commit via git push. Git's git/refs PATCH API # returns HTTP 405 on ANY protected branch (force or not, even for a user in # the force-push allowlist), so it cannot move a protected rc. git push honors # the push + force-push allowlists and creates rc if it is absent. - PUSH_URL="https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@${MOKOGITEA_URL#https://}/${GITEA_ORG}/${GITEA_REPO}.git" - git config --global user.name "mokogitea-actions[bot]" + PUSH_URL="https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@${MOKOGIT_URL#https://}/${GIT_ORG}/${GIT_REPO}.git" + git config --global user.name "mokogit-actions[bot]" git config --global user.email "actions@mokoconsulting.tech" git fetch --no-tags "$PUSH_URL" "${FROM}" git push --force "$PUSH_URL" "FETCH_HEAD:refs/heads/rc" \ @@ -144,28 +144,28 @@ jobs: - name: Trigger RC deploy run: | # Workflow-token pushes do NOT wake downstream workflows; dispatch deploy-rc explicitly. - curl -sf -X POST -H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \n -H "Content-Type: application/json" \n "${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}/actions/workflows/deploy-rc.yml/dispatches" \n -d '{"ref":"rc"}' \n && echo "Dispatched deploy-rc on rc" \n || echo "::warning::deploy-rc dispatch failed (no deploy-rc.yml on rc? non-go platform)" + curl -sf -X POST -H "Authorization: token ${{ secrets.MOKOGIT_TOKEN }}" \n -H "Content-Type: application/json" \n "${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}/actions/workflows/deploy-rc.yml/dispatches" \n -d '{"ref":"rc"}' \n && echo "Dispatched deploy-rc on rc" \n || echo "::warning::deploy-rc dispatch failed (no deploy-rc.yml on rc? non-go platform)" - name: Checkout rc and configure git run: | git fetch origin rc git checkout rc - git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "mokogitea-actions[bot]" - git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" + git config --local user.email "mokogit-actions[bot]@mokoconsulting.tech" + git config --local user.name "mokogit-actions[bot]" + git remote set-url origin "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" - name: Publish RC release continue-on-error: true run: | php ${MOKO_CLI}/release_publish.php \ --path . --stability rc --bump minor --branch rc \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" + --token "${{ secrets.MOKOGIT_TOKEN }}" - name: Update RC release notes from CHANGELOG.md continue-on-error: true run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" # Extract [Unreleased] section from changelog NOTES="" @@ -218,15 +218,15 @@ jobs: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} fetch-depth: 0 submodules: recursive - name: Configure git for bot pushes run: | - git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "mokogitea-actions[bot]" - git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" + git config --local user.email "mokogit-actions[bot]@mokoconsulting.tech" + git config --local user.name "mokogit-actions[bot]" + git remote set-url origin "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" - name: Check for merge conflict markers run: | @@ -243,7 +243,7 @@ jobs: - name: Setup MokoCLI tools env: - MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKO_CLONE_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_MIRROR_TOKEN }}"}}' run: | @@ -290,7 +290,7 @@ jobs: fi php ${MOKO_CLI}/release_publish.php \ --path . --stability stable ${BUMP_FLAG} --branch main \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" + --token "${{ secrets.MOKOGIT_TOKEN }}" - name: "Read published version" id: version @@ -317,8 +317,8 @@ jobs: !startsWith(steps.platform.outputs.platform, 'joomla') run: | VERSION="${{ steps.version.outputs.version }}" - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" SEMVER_TAG="v${VERSION}" echo "Creating semver tag: ${SEMVER_TAG}" @@ -342,8 +342,8 @@ jobs: - name: Update release notes and promote changelog run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" # Get the stable release info (version and ID) RELEASE_JSON=$(curl -sf -H "Authorization: token ${TOKEN}" \ @@ -445,10 +445,10 @@ jobs: VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" RELEASE_TAG="${{ steps.version.outputs.release_tag }}" GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}" - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" php ${MOKO_CLI}/release_mirror.php \ --version "$VERSION" --tag "$RELEASE_TAG" \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ + --token "${{ secrets.MOKOGIT_TOKEN }}" --api-base "$API_BASE" \ --gh-token "${{ secrets.GH_MIRROR_TOKEN }}" --gh-repo "$GH_REPO" \ --branch main 2>&1 || true echo "GitHub mirror updated" >> $GITHUB_STEP_SUMMARY @@ -474,8 +474,8 @@ jobs: if: steps.version.outputs.skip != 'true' continue-on-error: true run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" # Delete rc branch (ephemeral — created by promote-rc) curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \ @@ -490,8 +490,8 @@ jobs: if: steps.version.outputs.skip != 'true' continue-on-error: true run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" BRANCH_NAME="version/${VERSION}" MAIN_SHA=$(git rev-parse HEAD) @@ -511,9 +511,9 @@ jobs: if: steps.version.outputs.skip != 'true' continue-on-error: true run: | - API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" + API_BASE="${MOKOGIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" php ${MOKO_CLI}/version_reset_dev.php \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \ + --token "${{ secrets.MOKOGIT_TOKEN }}" --api-base "${API_BASE}" \ --branch dev --path . 2>&1 || true # -- Summary -------------------------------------------------------------- @@ -537,5 +537,5 @@ jobs: echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY - echo "| Release | [View](${MOKOGITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY + echo "| Release | [View](${MOKOGIT_URL}/${GIT_ORG}/${GIT_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY fi diff --git a/.mokogitea/workflows/branch-cleanup.yml b/.mokogit/workflows/branch-cleanup.yml similarity index 90% rename from .mokogitea/workflows/branch-cleanup.yml rename to .mokogit/workflows/branch-cleanup.yml index 909e706..abad92e 100644 --- a/.mokogitea/workflows/branch-cleanup.yml +++ b/.mokogit/workflows/branch-cleanup.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Universal # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/branch-cleanup.yml +# PATH: /.mokogit/workflows/branch-cleanup.yml # VERSION: 01.00.00 # BRIEF: Delete feature branches after PR merge @@ -37,7 +37,7 @@ jobs: ENCODED=$(printf '%s' "${BRANCH}" | sed 's|/|%2F|g') STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \ - -H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.MOKOGIT_TOKEN }}" \ "${API}/${ENCODED}" 2>/dev/null || true) if [ "$STATUS" = "204" ]; then diff --git a/.mokogitea/workflows/cascade-dev.yml b/.mokogit/workflows/cascade-dev.yml similarity index 93% rename from .mokogitea/workflows/cascade-dev.yml rename to .mokogit/workflows/cascade-dev.yml index 8ae17c4..5c4aaae 100644 --- a/.mokogitea/workflows/cascade-dev.yml +++ b/.mokogit/workflows/cascade-dev.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Cascade # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/cascade-dev.yml +# PATH: /.mokogit/workflows/cascade-dev.yml # VERSION: 02.01.00 # BRIEF: Cascade main -> dev; auto-merge clean, auto-resolve VERSION-stamp-only conflicts, else notify @@ -27,10 +27,10 @@ permissions: pull-requests: write env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} # ntfy destination is configured via repo or org variables (org vars are inherited). NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }} - NTFY_TOPIC: ${{ vars.CASCADE_NTFY_TOPIC || vars.NTFY_TOPIC || 'gitea-releases' }} + NTFY_TOPIC: ${{ vars.CASCADE_NTFY_TOPIC || vars.NTFY_TOPIC || 'git-releases' }} jobs: cascade: @@ -41,15 +41,15 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} - name: Cascade main -> dev (auto-resolve version stamps, else notify) env: - TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + TOKEN: ${{ secrets.MOKOGIT_TOKEN }} REPO: ${{ github.repository }} run: | set -uo pipefail - API="${MOKOGITEA_URL}/api/v1/repos/${REPO}" + API="${MOKOGIT_URL}/api/v1/repos/${REPO}" AUTH="Authorization: token ${TOKEN}" jqget() { python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('$1',''))" 2>/dev/null; } @@ -86,12 +86,12 @@ jobs: -H "Title: ${REPO}: dev cascade needs manual merge" \ -H "Tags: warning,twisted_rightwards_arrows" \ -H "Priority: high" \ - -H "Click: ${MOKOGITEA_URL}/${REPO}/pulls/${PR}" \ + -H "Click: ${MOKOGIT_URL}/${REPO}/pulls/${PR}" \ -d "main -> dev cascade PR #${PR} $1 It was NOT auto-merged; resolve it manually." \ "${NTFY_URL}/${NTFY_TOPIC}" || true } - # 3. wait for MokoGitea to compute mergeability (conflict detection) + # 3. wait for MokoGit to compute mergeability (conflict detection) MERGEABLE="" for _ in 1 2 3 4 5 6; do MERGEABLE=$(curl -sf -H "$AUTH" "${API}/pulls/${PR}" | jqget mergeable) @@ -115,7 +115,7 @@ jobs: # 4b. conflicts -> try to auto-resolve if they are ONLY VERSION-stamp lines. echo "PR not cleanly mergeable; checking whether conflicts are VERSION-stamp-only..." - git config user.name "MokoGitea Cascade" + git config user.name "MokoGit Cascade" git config user.email "actions@mokoconsulting.tech" git fetch --quiet origin main dev git checkout -B dev origin/dev diff --git a/.mokogitea/workflows/ci-generic.yml b/.mokogit/workflows/ci-generic.yml similarity index 97% rename from .mokogitea/workflows/ci-generic.yml rename to .mokogit/workflows/ci-generic.yml index 869087e..5d874ed 100644 --- a/.mokogitea/workflows/ci-generic.yml +++ b/.mokogit/workflows/ci-generic.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/ci-generic.yml +# PATH: /.mokogit/workflows/ci-generic.yml # VERSION: 01.00.00 # BRIEF: CI pipeline — lint, validate, and test for generic projects (PHP + Node.js) @@ -131,7 +131,7 @@ jobs: test: name: Tests runs-on: ubuntu-latest - # Independent job (no `needs: lint`): the MokoGitea Actions scheduler does not + # Independent job (no `needs: lint`): the MokoGit Actions scheduler does not # offer the dependent 2nd job of a needs-chain to runners, so it stalls in # "waiting" and is reaped by ABANDONED_JOB_TIMEOUT. Guard template repos # directly (same condition lint uses) instead of gating on lint's result. diff --git a/.mokogitea/workflows/ci-issue-reporter.yml b/.mokogit/workflows/ci-issue-reporter.yml similarity index 75% rename from .mokogitea/workflows/ci-issue-reporter.yml rename to .mokogit/workflows/ci-issue-reporter.yml index 600d8c1..52a7635 100644 --- a/.mokogitea/workflows/ci-issue-reporter.yml +++ b/.mokogit/workflows/ci-issue-reporter.yml @@ -3,12 +3,12 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Universal # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/ci-issue-reporter.yml +# PATH: /.mokogit/workflows/ci-issue-reporter.yml # VERSION: 01.00.00 -# BRIEF: Reusable workflow — creates/updates a MokoGitea issue when a CI gate fails. +# BRIEF: Reusable workflow — creates/updates a MokoGit issue when a CI gate fails. # Clones MokoCLI and runs cli/ci_issue_reporter.sh. name: "Universal: CI Issue Reporter" @@ -35,7 +35,7 @@ on: type: string default: "" secrets: - MOKOGITEA_TOKEN: + MOKOGIT_TOKEN: required: true env: @@ -49,16 +49,16 @@ jobs: steps: - name: Clone MokoCLI env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | - MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" - git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli + MOKOGIT_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" + git clone --depth 1 --filter=blob:none --sparse "${MOKOGIT_URL}/MokoConsulting/mokocli.git" /tmp/mokocli cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh - name: Report CI failure env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | chmod +x /tmp/mokocli/cli/ci_issue_reporter.sh /tmp/mokocli/cli/ci_issue_reporter.sh \ diff --git a/.mokogitea/workflows/cleanup.yml b/.mokogit/workflows/cleanup.yml similarity index 80% rename from .mokogitea/workflows/cleanup.yml rename to .mokogit/workflows/cleanup.yml index d08e29e..ae9cc01 100644 --- a/.mokogitea/workflows/cleanup.yml +++ b/.mokogit/workflows/cleanup.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Maintenance # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /.mokogitea/workflows/cleanup.yml +# PATH: /.mokogit/workflows/cleanup.yml # VERSION: 01.00.00 # BRIEF: Scheduled cleanup — delete merged branches and old workflow runs @@ -21,7 +21,7 @@ permissions: contents: write env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} jobs: cleanup: @@ -33,17 +33,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} - name: Delete merged branches env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | echo "=== Merged Branch Cleanup ===" - API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}" + API="${MOKOGIT_URL}/api/v1/repos/${{ github.repository }}" # List branches via API - BRANCHES=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + BRANCHES=$(curl -sS -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/branches?limit=50" | jq -r '.[].name') DELETED=0 @@ -56,7 +56,7 @@ jobs: # Check if branch is merged into main if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then echo " Deleting merged branch: ${BRANCH}" - curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + curl -sS -X DELETE -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/branches/${BRANCH}" 2>/dev/null || true DELETED=$((DELETED + 1)) fi @@ -66,20 +66,20 @@ jobs: - name: Clean old workflow runs env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | echo "=== Workflow Run Cleanup ===" - API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}" + API="${MOKOGIT_URL}/api/v1/repos/${{ github.repository }}" CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ) # Get old completed runs - RUNS=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + RUNS=$(curl -sS -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/actions/runs?status=completed&limit=50" | \ jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null) DELETED=0 for RUN_ID in $RUNS; do - curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + curl -sS -X DELETE -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/actions/runs/${RUN_ID}" 2>/dev/null || true DELETED=$((DELETED + 1)) done diff --git a/.mokogitea/workflows/custom/branch-protection-enforce.yml b/.mokogit/workflows/custom/branch-protection-enforce.yml similarity index 93% rename from .mokogitea/workflows/custom/branch-protection-enforce.yml rename to .mokogit/workflows/custom/branch-protection-enforce.yml index 6a6b217..75110ec 100644 --- a/.mokogitea/workflows/custom/branch-protection-enforce.yml +++ b/.mokogit/workflows/custom/branch-protection-enforce.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout MokoCLI uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} - name: Setup PHP run: | @@ -42,7 +42,7 @@ jobs: DRY_RUN="--dry-run" fi php cli/branch_protect_org.php \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" \ + --token "${{ secrets.MOKOGIT_TOKEN }}" \ --org "MokoConsulting" \ $DRY_RUN diff --git a/.mokogitea/workflows/custom/ci-platform.yml b/.mokogit/workflows/custom/ci-platform.yml similarity index 98% rename from .mokogitea/workflows/custom/ci-platform.yml rename to .mokogit/workflows/custom/ci-platform.yml index 0ac3fe8..43e8827 100644 --- a/.mokogitea/workflows/custom/ci-platform.yml +++ b/.mokogit/workflows/custom/ci-platform.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /.mokogitea/workflows/ci-platform.yml +# PATH: /.mokogit/workflows/ci-platform.yml # VERSION: 09.23.00 # BRIEF: mokocli CI — the standards engine validates itself # @@ -41,7 +41,7 @@ on: paths-ignore: - '**.md' - 'wiki/**' - - '.mokogitea/ISSUE_TEMPLATE/**' + - '.mokogit/ISSUE_TEMPLATE/**' pull_request: branches: - main @@ -356,7 +356,7 @@ jobs: echo "::error file=${file}::Invalid YAML" ERRORS=$((ERRORS + 1)) fi - done < <(find .mokogitea/workflows/ -name "*.yml" -o -name "*.yaml" 2>/dev/null | tr '\n' '\0') + done < <(find .mokogit/workflows/ -name "*.yml" -o -name "*.yaml" 2>/dev/null | tr '\n' '\0') { echo "### Template Integrity" @@ -453,8 +453,8 @@ jobs: needs.governance.result == 'failure' || needs.templates.result == 'failure') env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | chmod +x automation/ci-issue-reporter.sh REPORTER="./automation/ci-issue-reporter.sh" diff --git a/.mokogitea/workflows/custom/composer-publish.yml b/.mokogit/workflows/custom/composer-publish.yml similarity index 85% rename from .mokogitea/workflows/custom/composer-publish.yml rename to .mokogit/workflows/custom/composer-publish.yml index 0d104aa..4ecc97c 100644 --- a/.mokogitea/workflows/custom/composer-publish.yml +++ b/.mokogit/workflows/custom/composer-publish.yml @@ -13,7 +13,7 @@ on: workflow_dispatch: env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} jobs: publish: @@ -43,13 +43,13 @@ jobs: echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Package version: ${VERSION}" - # Gitea Composer Registry — auto-publishes from tags + # Git Composer Registry — auto-publishes from tags # The tag push itself registers the package at: # https://git.mokoconsulting.tech/api/packages/MokoConsulting/composer - - name: Verify Gitea registry + - name: Verify Git registry run: | - echo "Gitea Composer registry auto-publishes from tags." - echo "Package available at: ${MOKOGITEA_URL}/api/packages/MokoConsulting/composer" + echo "Git Composer registry auto-publishes from tags." + echo "Package available at: ${MOKOGIT_URL}/api/packages/MokoConsulting/composer" echo "Install: composer require mokoconsulting/mokocli" # Packagist — notify of new version (points to GitHub mirror which Packagist can access) @@ -72,5 +72,5 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "| Registry | Status |" >> $GITHUB_STEP_SUMMARY echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY - echo "| Gitea | \`composer require mokoconsulting/mokocli:${VERSION}\` |" >> $GITHUB_STEP_SUMMARY + echo "| Git | \`composer require mokoconsulting/mokocli:${VERSION}\` |" >> $GITHUB_STEP_SUMMARY echo "| Packagist | \`composer require mokoconsulting/mokocli\` |" >> $GITHUB_STEP_SUMMARY diff --git a/.mokogitea/workflows/custom/sync-feature-versions.yml b/.mokogit/workflows/custom/sync-feature-versions.yml similarity index 87% rename from .mokogitea/workflows/custom/sync-feature-versions.yml rename to .mokogit/workflows/custom/sync-feature-versions.yml index 56b4600..a4f7b57 100644 --- a/.mokogitea/workflows/custom/sync-feature-versions.yml +++ b/.mokogit/workflows/custom/sync-feature-versions.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: Gitea.Workflow +# DEFGROUP: Git.Workflow # INGROUP: mokocli.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /.mokogitea/workflows/sync-feature-versions.yml +# PATH: /.mokogit/workflows/sync-feature-versions.yml # VERSION: 01.00.00 # BRIEF: Merge dev into open feature branches after version bumps @@ -22,7 +22,7 @@ permissions: contents: write env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} jobs: sync: @@ -38,13 +38,13 @@ jobs: with: fetch-depth: 0 ref: dev - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} - name: Configure git run: | - git config --local user.email "gitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "gitea-actions[bot]" - git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" + git config --local user.email "git-actions[bot]@mokoconsulting.tech" + git config --local user.name "git-actions[bot]" + git remote set-url origin "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" - name: Merge dev into feature branches run: | diff --git a/.mokogitea/workflows/gitleaks.yml b/.mokogit/workflows/gitleaks.yml similarity index 96% rename from .mokogitea/workflows/gitleaks.yml rename to .mokogit/workflows/gitleaks.yml index 579f0cb..ea63333 100644 --- a/.mokogitea/workflows/gitleaks.yml +++ b/.mokogit/workflows/gitleaks.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Security # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /.mokogitea/workflows/gitleaks.yml +# PATH: /.mokogit/workflows/gitleaks.yml # VERSION: 01.00.00 # BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens # @@ -34,7 +34,7 @@ permissions: env: NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }} - NTFY_TOPIC: ${{ vars.NTFY_TOPIC || 'gitea-security' }} + NTFY_TOPIC: ${{ vars.NTFY_TOPIC || 'git-security' }} jobs: gitleaks: diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogit/workflows/issue-branch.yml similarity index 88% rename from .mokogitea/workflows/issue-branch.yml rename to .mokogit/workflows/issue-branch.yml index 12a4b11..c6f52aa 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogit/workflows/issue-branch.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Automation # VERSION: 01.00.00 # BRIEF: Auto-create feature branch when an issue is opened @@ -19,7 +19,7 @@ permissions: issues: write env: - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} jobs: create-branch: @@ -28,8 +28,8 @@ jobs: steps: - name: Create branch and comment run: | - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" - API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" + API="${MOKOGIT_URL}/api/v1/repos/${{ github.repository }}" ISSUE_NUM="${{ github.event.issue.number }}" ISSUE_TITLE="${{ github.event.issue.title }}" @@ -58,7 +58,7 @@ jobs: echo "Created branch: ${BRANCH}" # Comment on issue with branch link - REPO_URL="${MOKOGITEA_URL}/${{ github.repository }}" + REPO_URL="${MOKOGIT_URL}/${{ github.repository }}" BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`" curl -sf -X POST \ diff --git a/.mokogitea/workflows/notify.yml b/.mokogit/workflows/notify.yml similarity index 94% rename from .mokogitea/workflows/notify.yml rename to .mokogit/workflows/notify.yml index 7a03898..b1f0c3f 100644 --- a/.mokogitea/workflows/notify.yml +++ b/.mokogit/workflows/notify.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Notifications # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /.mokogitea/workflows/notify.yml +# PATH: /.mokogit/workflows/notify.yml # VERSION: 01.00.00 # BRIEF: Push notifications via ntfy on release success or workflow failure @@ -26,7 +26,7 @@ permissions: env: NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }} - NTFY_TOPIC: ${{ vars.NTFY_TOPIC || 'gitea-releases' }} + NTFY_TOPIC: ${{ vars.NTFY_TOPIC || 'git-releases' }} jobs: notify: diff --git a/.mokogitea/workflows/pr-check.yml b/.mokogit/workflows/pr-check.yml similarity index 95% rename from .mokogitea/workflows/pr-check.yml rename to .mokogit/workflows/pr-check.yml index 6da762a..2085152 100644 --- a/.mokogitea/workflows/pr-check.yml +++ b/.mokogit/workflows/pr-check.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/pr-check.yml +# PATH: /.mokogit/workflows/pr-check.yml # VERSION: 09.23.00 # BRIEF: PR gate — branch policy + code validation before merge @@ -145,7 +145,7 @@ jobs: steps: - name: Remind to update the wiki env: - TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + TOKEN: ${{ secrets.MOKOGIT_TOKEN }} SERVER: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} REPO: ${{ github.repository }} PR: ${{ github.event.pull_request.number }} @@ -210,7 +210,7 @@ jobs: - name: Check for merge conflict markers run: | - CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --exclude-dir='.git' --exclude-dir='.mokogitea' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true) + CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --exclude-dir='.git' --exclude-dir='.mokogit' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true) if [ -n "$CONFLICTS" ]; then echo "::error::Merge conflict markers found in source files" echo "## Conflict Markers Found" >> $GITHUB_STEP_SUMMARY @@ -224,7 +224,7 @@ jobs: - name: Detect platform id: platform run: | - # Platform comes from the MokoGitea metadata API (public GET). + # Platform comes from the MokoGit metadata API (public GET). API="${GITHUB_SERVER_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${GITHUB_REPOSITORY}/metadata" PLATFORM="$(curl -sf "$API" 2>/dev/null | python3 -c "import sys, json; print(json.load(sys.stdin).get('platform') or '')" 2>/dev/null || true)" [ -z "$PLATFORM" ] && PLATFORM="generic" @@ -361,10 +361,10 @@ jobs: for ELEMENT in name version description; do grep -q "<${ELEMENT}>" "$MANIFEST" || { echo "::error::Missing <${ELEMENT}> in manifest"; exit 1; } done - # Block legacy raw/branch update server URLs on MokoGitea - RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true) + # Block legacy raw/branch update server URLs on MokoGit + RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogit\|git\.mokoconsulting\.tech' || true) if [ -n "$RAW_URLS" ]; then - echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the MokoGitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)" + echo "::error::Manifest contains legacy raw/branch update server URL on MokoGit. Use the MokoGit Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)" echo "$RAW_URLS" exit 1 fi @@ -578,12 +578,12 @@ jobs: steps: - name: Trigger RC pre-release env: - MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKOGIT_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} REPO: ${{ github.repository }} BRANCH: ${{ github.head_ref }} - MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + MOKOGIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | - curl -s -X POST "${MOKOGITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${MOKOGITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" + curl -s -X POST "${MOKOGIT_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${MOKOGIT_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY @@ -594,7 +594,7 @@ jobs: if: >- always() && needs.validate.result == 'failure' - uses: ./.mokogitea/workflows/ci-issue-reporter.yml + uses: ./.mokogit/workflows/ci-issue-reporter.yml with: gate: "PR Validation" workflow: "PR Check" diff --git a/.mokogitea/workflows/pre-release.yml b/.mokogit/workflows/pre-release.yml similarity index 86% rename from .mokogitea/workflows/pre-release.yml rename to .mokogit/workflows/pre-release.yml index 4ea0367..437f355 100644 --- a/.mokogitea/workflows/pre-release.yml +++ b/.mokogit/workflows/pre-release.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Release # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/pre-release.yml +# PATH: /.mokogit/workflows/pre-release.yml # VERSION: 05.02.01 # BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches @@ -40,9 +40,9 @@ permissions: contents: write env: - GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} - GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} - GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} + GIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + GIT_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} + GIT_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} jobs: build: @@ -61,7 +61,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.MOKOGITEA_TOKEN }} + token: ${{ secrets.MOKOGIT_TOKEN }} ref: ${{ github.ref_name }} submodules: recursive @@ -71,7 +71,7 @@ jobs: - name: Setup MokoCLI tools env: - MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKO_CLONE_TOKEN: ${{ secrets.MOKOGIT_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting run: | # Use pre-installed /opt/mokocli if available (updated by cron every 6h) @@ -156,9 +156,9 @@ jobs: fi # Commit version bump - git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech" - git config --local user.name "mokogitea-actions[bot]" - git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" + git config --local user.email "mokogit-actions[bot]@mokoconsulting.tech" + git config --local user.name "mokogit-actions[bot]" + git remote set-url origin "https://x-access-token:${{ secrets.MOKOGIT_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" git add -A git diff --cached --quiet || { git commit -m "chore(version): pre-release bump to ${VERSION} [skip ci]" @@ -174,12 +174,12 @@ jobs: # Auto-detect element via manifest_element.php php ${MOKO_CLI}/manifest_element.php \ --path . --version "$VERSION" --stability "$STABILITY" \ - --repo "${GITEA_REPO}" --github-output + --repo "${GIT_REPO}" --github-output # Read back element outputs EXT_ELEMENT=$(grep '^ext_element=' "$GITHUB_OUTPUT" | tail -1 | cut -d= -f2) ZIP_NAME=$(grep '^zip_name=' "$GITHUB_OUTPUT" | tail -1 | cut -d= -f2) - [ -z "$EXT_ELEMENT" ] && EXT_ELEMENT=$(echo "${GITEA_REPO}" | tr '[:upper:]' '[:lower:]' | tr -d ' -') + [ -z "$EXT_ELEMENT" ] && EXT_ELEMENT=$(echo "${GIT_REPO}" | tr '[:upper:]' '[:lower:]' | tr -d ' -') [ -z "$ZIP_NAME" ] && ZIP_NAME="${EXT_ELEMENT}-${VERSION}.zip" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" @@ -197,18 +197,18 @@ jobs: run: | TAG="${{ steps.meta.outputs.tag }}" VERSION="${{ steps.meta.outputs.version }}" - API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" + API_BASE="${GIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" php ${MOKO_CLI}/release_create.php \ --path . --version "$VERSION" --tag "$TAG" \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ - --repo "${GITEA_REPO}" --branch "${{ github.ref_name }}" --prerelease + --token "${{ secrets.MOKOGIT_TOKEN }}" --api-base "$API_BASE" \ + --repo "${GIT_REPO}" --branch "${{ github.ref_name }}" --prerelease - name: Update release notes from CHANGELOG.md if: steps.eligibility.outputs.proceed == 'true' run: | TAG="${{ steps.meta.outputs.tag }}" VERSION="${{ steps.meta.outputs.version }}" - API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" + API_BASE="${GIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" # Extract [Unreleased] section from changelog (everything between [Unreleased] and next ## heading) if [ -f "CHANGELOG.md" ]; then @@ -219,7 +219,7 @@ jobs: fi # Update release body via API - RELEASE_ID=$(curl -sf -H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \ + RELEASE_ID=$(curl -sf -H "Authorization: token ${{ secrets.MOKOGIT_TOKEN }}" \ "${API_BASE}/releases/tags/${TAG}" | python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true) if [ -n "$RELEASE_ID" ]; then @@ -231,7 +231,7 @@ jobs: '${API_BASE}/releases/${RELEASE_ID}', data=payload, method='PATCH', headers={ - 'Authorization': 'token ${{ secrets.MOKOGITEA_TOKEN }}', + 'Authorization': 'token ${{ secrets.MOKOGIT_TOKEN }}', 'Content-Type': 'application/json' }) urllib.request.urlopen(req) @@ -245,21 +245,21 @@ jobs: run: | VERSION="${{ steps.meta.outputs.version }}" TAG="${{ steps.meta.outputs.tag }}" - API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" + API_BASE="${GIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" php ${MOKO_CLI}/release_package.php \ --path . --version "$VERSION" --tag "$TAG" \ - --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ - --repo "${GITEA_REPO}" --output /tmp || true + --token "${{ secrets.MOKOGIT_TOKEN }}" --api-base "$API_BASE" \ + --repo "${GIT_REPO}" --output /tmp || true - # updates.xml is generated dynamically by MokoGitea license server + # updates.xml is generated dynamically by MokoGit license server # No need to build, commit, or sync updates.xml from workflows - name: "Delete lesser pre-release channels (cascade)" if: steps.eligibility.outputs.proceed == 'true' continue-on-error: true run: | - API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" - TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" + API_BASE="${GIT_URL}/api/v1/repos/${GIT_ORG}/${GIT_REPO}" + TOKEN="${{ secrets.MOKOGIT_TOKEN }}" php ${MOKO_CLI}/release_cascade.php \ --stability "${{ steps.meta.outputs.stability }}" \ diff --git a/.mokogitea/workflows/rc-revert.yml b/.mokogit/workflows/rc-revert.yml similarity index 90% rename from .mokogitea/workflows/rc-revert.yml rename to .mokogit/workflows/rc-revert.yml index f58d1fa..470fdaf 100644 --- a/.mokogitea/workflows/rc-revert.yml +++ b/.mokogit/workflows/rc-revert.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Universal # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/rc-revert.yml +# PATH: /.mokogit/workflows/rc-revert.yml # VERSION: 09.23.00 # BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge @@ -33,8 +33,8 @@ jobs: env: BRANCH: ${{ github.event.pull_request.head.ref }} REPO: ${{ github.repository }} - GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} - TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + GIT_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} + TOKEN: ${{ secrets.MOKOGIT_TOKEN }} run: | set -euo pipefail # BRANCH is attacker-controlled (PR head ref). Strict allowlist before ANY use. @@ -43,7 +43,7 @@ jobs: fi SUFFIX="${BRANCH#rc/}" DEV_BRANCH="dev/${SUFFIX}" - API="${GITEA_URL}/api/v1/repos/${REPO}/branches" + API="${GIT_URL}/api/v1/repos/${REPO}/branches" # Create dev/ branch from rc/ branch STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \ diff --git a/.mokogitea/workflows/repo-health.yml b/.mokogit/workflows/repo-health.yml similarity index 98% rename from .mokogitea/workflows/repo-health.yml rename to .mokogit/workflows/repo-health.yml index 3011fb7..fb60244 100644 --- a/.mokogitea/workflows/repo-health.yml +++ b/.mokogit/workflows/repo-health.yml @@ -6,10 +6,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow +# DEFGROUP: MokoGit.Workflow # INGROUP: MokoCLI.Validation # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.mokogitea/workflows/repo-health.yml +# PATH: /.mokogit/workflows/repo-health.yml # VERSION: 09.23.00 # BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts. # ============================================================================ @@ -45,7 +45,7 @@ env: SCRIPTS_ALLOWED_DIRS: scripts,scripts/fix,scripts/lib,scripts/release,scripts/run,scripts/validate # Repo health policy - REPO_REQUIRED_ARTIFACTS: README.md,LICENSE,CHANGELOG.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,.mokogitea/workflows/ + REPO_REQUIRED_ARTIFACTS: README.md,LICENSE,CHANGELOG.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,.mokogit/workflows/ REPO_OPTIONAL_FILES: SECURITY.md,GOVERNANCE.md,.editorconfig,.gitattributes,.gitignore,README.md,docs/ REPO_DISALLOWED_DIRS: REPO_DISALLOWED_FILES: TODO.md,todo.md @@ -56,7 +56,7 @@ env: # File / directory variables DOCS_INDEX: docs/docs-index.md SCRIPT_DIR: scripts - WORKFLOWS_DIR: .mokogitea/workflows + WORKFLOWS_DIR: .mokogit/workflows SHELLCHECK_PATTERN: '*.sh' SPDX_FILE_GLOBS: '*.sh,*.php,*.js,*.ts,*.css,*.xml,*.yml,*.yaml' FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true @@ -77,7 +77,7 @@ jobs: - name: Check actor permission (admin only) id: perm env: - TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }} + TOKEN: ${{ secrets.MOKOGIT_TOKEN || github.token }} REPO: ${{ github.repository }} ACTOR: ${{ github.actor }} run: | @@ -88,14 +88,14 @@ jobs: # Hardcoded authorized users — always allowed case "$ACTOR" in - jmiller|mokogitea-actions[bot]) + jmiller|mokogit-actions[bot]) ALLOWED=true PERMISSION=admin METHOD="hardcoded allowlist" ;; *) # Detect platform and check permissions via API - API_BASE="${GITHUB_API_URL:-${GITEA_API_URL:-https://api.github.com}}" + API_BASE="${GITHUB_API_URL:-${GIT_API_URL:-https://api.github.com}}" RESP=$(curl -sf -H "Authorization: token ${TOKEN}" \ "${API_BASE}/repos/${REPO}/collaborators/${ACTOR}/permission" 2>/dev/null || echo '{}') PERMISSION=$(echo "$RESP" | grep -oP '"permission"\s*:\s*"\K[^"]+' || echo "unknown") @@ -605,7 +605,7 @@ jobs: printf '%s\n' '| Domain | Status | Notes |' printf '%s\n' '|---|---|---|' printf '%s\n' '| Access control | OK | Admin-only execution gate |' - printf '%s\n' '| Release policy | N/A | Releases handled by MokoGitea |' + printf '%s\n' '| Release policy | N/A | Releases handled by MokoGit |' printf '%s\n' '| Scripts governance | OK | Directory policy and advisory reporting |' printf '%s\n' '| Repo required artifacts | OK | Required, optional, disallowed enforcement |' printf '%s\n' '| Repo content heuristics | OK | Brand, license, changelog structure |' @@ -677,7 +677,7 @@ jobs: if: >- always() && needs.scripts_governance.result == 'failure' - uses: ./.mokogitea/workflows/ci-issue-reporter.yml + uses: ./.mokogit/workflows/ci-issue-reporter.yml with: gate: "Scripts Governance" workflow: "Repo Health" @@ -691,7 +691,7 @@ jobs: if: >- always() && needs.repo_health.result == 'failure' - uses: ./.mokogitea/workflows/ci-issue-reporter.yml + uses: ./.mokogit/workflows/ci-issue-reporter.yml with: gate: "Repository Health" workflow: "Repo Health" diff --git a/.mokogitea/workflows/standards-compliance.yml b/.mokogit/workflows/standards-compliance.yml similarity index 98% rename from .mokogitea/workflows/standards-compliance.yml rename to .mokogit/workflows/standards-compliance.yml index 2a7abc3..4a8d9d6 100644 --- a/.mokogitea/workflows/standards-compliance.yml +++ b/.mokogit/workflows/standards-compliance.yml @@ -4,7 +4,7 @@ # DEFGROUP: GitHub.Workflow # INGROUP: MokoCLI.Compliance # REPO: https://github.com/mokoconsulting-tech/mokocli -# PATH: /.mokogitea/workflows/standards-compliance.yml +# PATH: /.mokogit/workflows/standards-compliance.yml # VERSION: 04.06.00 # BRIEF: MokoCLI compliance validation workflow # NOTE: Validates repository structure, documentation, and coding standards @@ -299,7 +299,7 @@ jobs: echo "|-----------|--------|-------|------|-------|" >> $GITHUB_STEP_SUMMARY # Check required directories - for dir in .mokogitea; do + for dir in .mokogit; do if [ -d "$dir" ]; then FILE_COUNT=$(find "$dir" -type f 2>/dev/null | wc -l) DIR_SIZE=$(du -sh "$dir" 2>/dev/null | cut -f1) @@ -320,7 +320,7 @@ jobs: echo "### 🔴 Critical Issues: $MISSING" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Remediation Steps:**" >> $GITHUB_STEP_SUMMARY - [ ! -d ".mokogitea" ] && echo "- Create .mokogitea directory: \`mkdir -p .mokogitea/workflows\`" >> $GITHUB_STEP_SUMMARY + [ ! -d ".mokogit" ] && echo "- Create .mokogit directory: \`mkdir -p .mokogit/workflows\`" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "📚 Reference: [MokoCLI Repository Structure](https://github.com/mokoconsulting-tech/mokocli/tree/main/docs/policy/core-structure.md)" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY @@ -563,17 +563,17 @@ jobs: set -x echo "### GitHub Actions Workflows" >> $GITHUB_STEP_SUMMARY - WORKFLOWS_DIR=".mokogitea/workflows" + WORKFLOWS_DIR=".mokogit/workflows" if [ ! -d "$WORKFLOWS_DIR" ]; then echo "❌ No workflows directory found" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### ❌ Validation Failed: Workflows Directory Missing" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "**Error:** .mokogitea/workflows directory is required for CI/CD automation" >> $GITHUB_STEP_SUMMARY - echo "**Action Required:** Create .mokogitea/workflows directory and add GitHub Actions workflows" >> $GITHUB_STEP_SUMMARY + echo "**Error:** .mokogit/workflows directory is required for CI/CD automation" >> $GITHUB_STEP_SUMMARY + echo "**Action Required:** Create .mokogit/workflows directory and add GitHub Actions workflows" >> $GITHUB_STEP_SUMMARY echo "" - echo "❌ ERROR: .mokogitea/workflows directory not found" + echo "❌ ERROR: .mokogit/workflows directory not found" exit 1 fi @@ -612,7 +612,7 @@ jobs: echo "### Workflow YAML Syntax" >> $GITHUB_STEP_SUMMARY INVALID=0 - for workflow in $(find .mokogitea/workflows -maxdepth 1 -type f \( -name "*.yml" -o -name "*.yaml" \) 2>/dev/null); do + for workflow in $(find .mokogit/workflows -maxdepth 1 -type f \( -name "*.yml" -o -name "*.yaml" \) 2>/dev/null); do if [ -f "$workflow" ]; then if python3 -c "import yaml, sys; yaml.safe_load(open(sys.argv[1]))" "$workflow" 2>/dev/null; then echo "✅ $(basename $workflow)" >> $GITHUB_STEP_SUMMARY @@ -629,7 +629,7 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "**Error:** $INVALID workflow file(s) have invalid YAML syntax" >> $GITHUB_STEP_SUMMARY echo "**Action Required:** Fix YAML syntax errors in the marked workflow files" >> $GITHUB_STEP_SUMMARY - echo "**Tool:** Run \`python3 -c \"import yaml; yaml.safe_load(open('.mokogitea/workflows/FILE.yml'))\"\` locally" >> $GITHUB_STEP_SUMMARY + echo "**Tool:** Run \`python3 -c \"import yaml; yaml.safe_load(open('.mokogit/workflows/FILE.yml'))\"\` locally" >> $GITHUB_STEP_SUMMARY echo "" echo "❌ ERROR: $INVALID workflow file(s) with invalid YAML syntax" exit 1 @@ -641,7 +641,7 @@ jobs: echo "✅ SUCCESS: All workflow files passed YAML validation" - name: Validate CodeQL Configuration - if: hashFiles('.mokogitea/workflows/codeql-analysis.yml') != '' + if: hashFiles('.mokogit/workflows/codeql-analysis.yml') != '' run: | set -e echo "" >> $GITHUB_STEP_SUMMARY @@ -649,7 +649,7 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY # Inline validation (rewritten from Python to bash for PHP-only architecture) - CODEQL_FILE=".mokogitea/workflows/codeql-analysis.yml" + CODEQL_FILE=".mokogit/workflows/codeql-analysis.yml" if [ ! -f "$CODEQL_FILE" ]; then echo "⚠️ CodeQL workflow file not found" >> $GITHUB_STEP_SUMMARY @@ -1186,7 +1186,7 @@ jobs: fi # Run yamllint and count line-length warnings - YAML_OUTPUT=$(yamllint .mokogitea/workflows/*.yml 2>&1 | grep "line too long" || true) + YAML_OUTPUT=$(yamllint .mokogit/workflows/*.yml 2>&1 | grep "line too long" || true) if [ -n "$YAML_OUTPUT" ]; then YAML_VIOLATIONS=$(echo "$YAML_OUTPUT" | wc -l) echo "⚠️ Found $YAML_VIOLATIONS lines exceeding 180 characters in YAML files" >> $GITHUB_STEP_SUMMARY @@ -2130,17 +2130,17 @@ jobs: WARNINGS=0 ERRORS=0 - # 1. Check .mokogitea/config.tf location (not root override files) + # 1. Check .mokogit/config.tf location (not root override files) echo "### Override Configuration Check" >> $GITHUB_STEP_SUMMARY LEGACY_OVERRIDES=$(find . -maxdepth 1 -name "*override*.tf" -o -name "MokoCLI.override.tf" 2>/dev/null | wc -l || echo 0) if [ "$LEGACY_OVERRIDES" -gt 0 ]; then echo "⚠️ Found legacy override files in root directory" >> $GITHUB_STEP_SUMMARY - echo "**Expected Location**: .mokogitea/config.tf" >> $GITHUB_STEP_SUMMARY + echo "**Expected Location**: .mokogit/config.tf" >> $GITHUB_STEP_SUMMARY echo "**Legacy files found**: $LEGACY_OVERRIDES" >> $GITHUB_STEP_SUMMARY WARNINGS=$((WARNINGS + 1)) else - if [ -f ".mokogitea/config.tf" ]; then - echo "✅ Override configuration in correct location (.mokogitea/config.tf)" >> $GITHUB_STEP_SUMMARY + if [ -f ".mokogit/config.tf" ]; then + echo "✅ Override configuration in correct location (.mokogit/config.tf)" >> $GITHUB_STEP_SUMMARY else echo "ℹ️ No override configuration found" >> $GITHUB_STEP_SUMMARY fi diff --git a/.mokogitea/workflows/version-set.yml b/.mokogit/workflows/version-set.yml similarity index 96% rename from .mokogitea/workflows/version-set.yml rename to .mokogit/workflows/version-set.yml index d7339bd..8a3200d 100644 --- a/.mokogitea/workflows/version-set.yml +++ b/.mokogit/workflows/version-set.yml @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later # # FILE INFORMATION -# DEFGROUP: MokoGitea.Workflow.Template +# DEFGROUP: MokoGit.Workflow.Template # INGROUP: MokoCLI.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla -# PATH: /.mokogitea/workflows/version-set.yml +# PATH: /.mokogit/workflows/version-set.yml # VERSION: 01.00.00 # BRIEF: Set or reset the extension version across all version-bearing files @@ -49,7 +49,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{ secrets.MOKOGITEA_TOKEN || github.token }} + token: ${{ secrets.MOKOGIT_TOKEN || github.token }} ref: ${{ inputs.branch || github.ref }} fetch-depth: 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7df945..0026b6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge 7. **Merging to main** triggers the stable release pipeline: - Minor version bump (e.g., `02.09.xx` → `02.10.00`) - Stability suffix stripped (clean version) - - MokoGitea release created with ZIP/tar.gz packages + - MokoGit release created with ZIP/tar.gz packages - `updates.xml` updated (Joomla extensions) - `dev` branch recreated from `main` @@ -119,7 +119,7 @@ This ensures Joomla sites on ANY stability channel see the update (Joomla only s The version tools update all files containing version stamps: -- `.mokogitea/manifest.xml` (canonical source) +- `.mokogit/manifest.xml` (canonical source) - Joomla XML manifests (`` tag) - `README.md`, `CHANGELOG.md` (`VERSION:` pattern) - `package.json`, `pyproject.toml` diff --git a/README.md b/README.md index 26ff4ce..d2b31cd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ BRIEF: Project overview and documentation PHP implementation of mokocli — enterprise standards, automation framework, workflow templates, and bulk sync tooling. -> **Primary platform**: [MokoGitea — git.mokoconsulting.tech](https://git.mokoconsulting.tech/MokoConsulting/MokoCli-API) +> **Primary platform**: [MokoGit — git.mokoconsulting.tech](https://git.mokoconsulting.tech/MokoConsulting/MokoCli-API) > **Backup mirror**: [GitHub](https://github.com/MokoConsulting/MokoCli-API) *(read-only mirror)* ## What Lives Here @@ -25,7 +25,7 @@ PHP implementation of mokocli — enterprise standards, automation framework, wo |-----------|---------| | `lib/Enterprise/` | 38 PHP enterprise library classes (platform adapters, sync, validation, plugins) | | `cli/` | CLI scripts (archive, create, release, sync rulesets, version management) | -| `automation/` | Bulk sync, push files, repo cleanup, MokoGitea migration | +| `automation/` | Bulk sync, push files, repo cleanup, MokoGit migration | | `validate/` | 18 validation scripts (health, structure, secrets, syntax, drift) | | `templates/` | **Workflow templates** and config templates synced to governed repos | | `definitions/` | Repository structure definitions (`.tf` format) | @@ -42,7 +42,7 @@ composer require mokoconsulting-tech/enterprise ### Composer Registry -This package is served from MokoGitea package registry. Add this to your `composer.json`: +This package is served from MokoGit package registry. Add this to your `composer.json`: ```json { @@ -72,11 +72,11 @@ vendor/bin/moko inventory -- --path . | Variable | Purpose | |----------|---------| -| `GIT_PLATFORM` | `gitea` (default) or `github` | -| `GA_TOKEN` | MokoGitea API / MokoGitea Actions token | +| `GIT_PLATFORM` | `git` (default) or `github` | +| `GA_TOKEN` | MokoGit API / MokoGit Actions token | | `GH_TOKEN` | GitHub API token (for mirror sync) | -| `GITEA_URL` | MokoGitea instance URL (default: `https://git.mokoconsulting.tech`) | -| `GITEA_ORG` | MokoGitea organization (default: `MokoConsulting`) | +| `GIT_URL` | MokoGit instance URL (default: `https://git.mokoconsulting.tech`) | +| `GIT_ORG` | MokoGit organization (default: `MokoConsulting`) | ## License diff --git a/bin/moko b/bin/moko index 8cea39b..21bff3c 100644 --- a/bin/moko +++ b/bin/moko @@ -21,7 +21,7 @@ * * COMMANDS (run `php bin/moko list` for the full list — 97 commands) * - * Automation sync, automation:cleanup, automation:migrate-gitea + * Automation sync, automation:cleanup, automation:migrate-git * Validation health, detect, drift, check:syntax, check:version, ... * Release release, release:joomla, release:create, release:publish, ... * Version version:read, version:bump, version:auto-bump, ... @@ -91,7 +91,7 @@ const COMMAND_MAP = [ 'sync' => 'automation/bulk_sync.php', 'deps:update' => 'automation/update_dependencies.php', 'automation:cleanup' => 'automation/repo_cleanup.php', - 'automation:migrate-gitea' => 'automation/migrate_to_gitea.php', + 'automation:migrate-git' => 'automation/migrate_to_git.php', // Maintenance 'inventory' => 'maintenance/update_repo_inventory.php', diff --git a/cli/branch_protect_org.php b/cli/branch_protect_org.php index 46fd057..fd7f047 100644 --- a/cli/branch_protect_org.php +++ b/cli/branch_protect_org.php @@ -25,7 +25,7 @@ if (isset($options['help']) || empty($options['token'])) { echo "Usage: php cli/branch_protect_org.php --token TOKEN [--org ORG] [--api-base URL] [--dry-run]\n"; echo "\n"; echo "Options:\n"; - echo " --token Gitea API token (required)\n"; + echo " --token Git API token (required)\n"; echo " --org Organization name (default: MokoConsulting)\n"; echo " --api-base API base URL (default: https://git.mokoconsulting.tech/api/v1)\n"; echo " --dry-run Show what would be changed without making changes\n"; diff --git a/cli/branch_rename.php b/cli/branch_rename.php index 2441091..7044f77 100644 --- a/cli/branch_rename.php +++ b/cli/branch_rename.php @@ -11,7 +11,7 @@ * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/branch_rename.php * VERSION: 09.43.00 - * BRIEF: Rename a git branch via Gitea API (create new, update PR, delete old) + * BRIEF: Rename a git branch via Git API (create new, update PR, delete old) */ declare(strict_types=1); @@ -24,7 +24,7 @@ class BranchRenameCli extends CliFramework { protected function configure(): void { - $this->setDescription('Rename a git branch via Gitea API (create new, update PR, delete old)'); + $this->setDescription('Rename a git branch via Git API (create new, update PR, delete old)'); $this->addArgument('--from', 'Source branch name', ''); $this->addArgument('--to', 'Target branch name', ''); $this->addArgument('--token', 'API token', ''); diff --git a/cli/bulk_workflow_push.php b/cli/bulk_workflow_push.php index 9fba428..c7f79b8 100644 --- a/cli/bulk_workflow_push.php +++ b/cli/bulk_workflow_push.php @@ -13,7 +13,7 @@ * REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli * PATH: /cli/bulk_workflow_push.php * VERSION: 09.43.00 - * BRIEF: Push a workflow file to all governed repos via the Gitea Contents API + * BRIEF: Push a workflow file to all governed repos via the Git Contents API */ declare(strict_types=1); @@ -31,18 +31,18 @@ class BulkWorkflowPushCli extends CliFramework protected function configure(): void { - $this->setDescription('Push a workflow file to all governed repos via the Gitea Contents API'); - $this->addArgument('--gitea-url', 'Gitea URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); - $this->addArgument('--token', 'Gitea API token', ''); + $this->setDescription('Push a workflow file to all governed repos via the Git Contents API'); + $this->addArgument('--git-url', 'Git URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); + $this->addArgument('--token', 'Git API token', ''); $this->addArgument('--org', 'Target organization', ''); $this->addArgument('--file', 'Local workflow file to push', ''); - $this->addArgument('--dest', 'Destination path in repos (default: .mokogitea/workflows/)', ''); + $this->addArgument('--dest', 'Destination path in repos (default: .mokogit/workflows/)', ''); $this->addArgument('--branch', 'Target branch (default: main)', 'main'); } protected function run(): int { - $giteaUrl = rtrim($this->getArgument('--gitea-url'), '/'); + $gitUrl = rtrim($this->getArgument('--git-url'), '/'); $token = $this->getArgument('--token'); $org = $this->getArgument('--org'); $workflowFile = $this->getArgument('--file'); @@ -70,7 +70,7 @@ class BulkWorkflowPushCli extends CliFramework } if ($destPath === '') { - $destPath = '.mokogitea/workflows/' . basename($workflowFile); + $destPath = '.mokogit/workflows/' . basename($workflowFile); } $localContent = file_get_contents($workflowFile); @@ -82,7 +82,7 @@ class BulkWorkflowPushCli extends CliFramework $this->log('INFO', "Pushing: {$workflowFile}"); $this->log('INFO', " -> {$destPath} (branch: {$branch})"); - $this->log('INFO', " -> Org: {$org} @ {$giteaUrl}"); + $this->log('INFO', " -> Org: {$org} @ {$gitUrl}"); if ($this->dryRun) { $this->log('INFO', '[DRY RUN] No changes will be made.'); @@ -90,7 +90,7 @@ class BulkWorkflowPushCli extends CliFramework echo "\n"; - $repos = $this->fetchOrgRepos($giteaUrl, $token, $org); + $repos = $this->fetchOrgRepos($gitUrl, $token, $org); if ($repos === null) { return 1; @@ -104,7 +104,7 @@ class BulkWorkflowPushCli extends CliFramework $encodedContent = base64_encode($localContent); foreach ($repos as $repo) { - $this->pushToRepo($giteaUrl, $token, $repo, $encodedContent, $localContent, $destPath, $branch); + $this->pushToRepo($gitUrl, $token, $repo, $encodedContent, $localContent, $destPath, $branch); } echo "\n"; @@ -115,7 +115,7 @@ class BulkWorkflowPushCli extends CliFramework } private function pushToRepo( - string $giteaUrl, + string $gitUrl, string $token, string $repoFullName, string $encodedContent, @@ -126,7 +126,7 @@ class BulkWorkflowPushCli extends CliFramework [$owner, $repoName] = explode('/', $repoFullName, 2); $existing = $this->apiRequest( - $giteaUrl, + $gitUrl, $token, 'GET', "/api/v1/repos/{$owner}/{$repoName}/contents/" @@ -159,7 +159,7 @@ class BulkWorkflowPushCli extends CliFramework ]); $response = $this->apiRequest( - $giteaUrl, + $gitUrl, $token, 'PUT', "/api/v1/repos/{$owner}/{$repoName}/contents/" @@ -189,7 +189,7 @@ class BulkWorkflowPushCli extends CliFramework ]); $response = $this->apiRequest( - $giteaUrl, + $gitUrl, $token, 'POST', "/api/v1/repos/{$owner}/{$repoName}/contents/" @@ -210,7 +210,7 @@ class BulkWorkflowPushCli extends CliFramework } } - private function fetchOrgRepos(string $giteaUrl, string $token, string $org): ?array + private function fetchOrgRepos(string $gitUrl, string $token, string $org): ?array { $this->log('INFO', "Fetching repos from org: {$org}"); @@ -219,7 +219,7 @@ class BulkWorkflowPushCli extends CliFramework while (true) { $response = $this->apiRequest( - $giteaUrl, + $gitUrl, $token, 'GET', "/api/v1/orgs/{$org}/repos?" @@ -261,13 +261,13 @@ class BulkWorkflowPushCli extends CliFramework } private function apiRequest( - string $giteaUrl, + string $gitUrl, string $token, string $method, string $endpoint, ?string $body = null ): array { - $url = $giteaUrl . $endpoint; + $url = $gitUrl . $endpoint; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/cli/bulk_workflow_trigger.php b/cli/bulk_workflow_trigger.php index f84c58a..e80b0b5 100644 --- a/cli/bulk_workflow_trigger.php +++ b/cli/bulk_workflow_trigger.php @@ -24,7 +24,7 @@ use MokoCli\CliFramework; class BulkWorkflowTriggerCli extends CliFramework { - private string $giteaUrl = 'https://git.mokoconsulting.tech'; + private string $gitUrl = 'https://git.mokoconsulting.tech'; private string $token = ''; private string $reposFile = ''; private string $org = ''; @@ -35,8 +35,8 @@ class BulkWorkflowTriggerCli extends CliFramework protected function configure(): void { $this->setDescription('Trigger a workflow across multiple repos at once'); - $this->addArgument('--gitea-url', 'Gitea URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); - $this->addArgument('--token', 'Gitea API token', ''); + $this->addArgument('--git-url', 'Git URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); + $this->addArgument('--token', 'Git API token', ''); $this->addArgument('--repos', 'File with newline-separated owner/repo list', ''); $this->addArgument('--org', 'Trigger on all repos in an org', ''); $this->addArgument('--workflow', 'Workflow file (e.g., "sync-servers.yml")', ''); @@ -46,7 +46,7 @@ class BulkWorkflowTriggerCli extends CliFramework protected function run(): int { - $this->giteaUrl = rtrim($this->getArgument('--gitea-url'), '/'); + $this->gitUrl = rtrim($this->getArgument('--git-url'), '/'); $this->token = $this->getArgument('--token'); $this->reposFile = $this->getArgument('--repos'); $this->org = $this->getArgument('--org'); @@ -78,7 +78,7 @@ class BulkWorkflowTriggerCli extends CliFramework } $this->log('INFO', "Triggering workflow \"{$this->workflow}\" on ref \"{$this->ref}\" across " . count($repos) . " repo(s)."); - $this->log('INFO', "Gitea URL: {$this->giteaUrl}"); + $this->log('INFO', "Git URL: {$this->gitUrl}"); if ($this->dryRun) { $this->log('INFO', '[DRY RUN] No requests will be sent.'); @@ -209,7 +209,7 @@ class BulkWorkflowTriggerCli extends CliFramework private function apiRequest(string $method, string $endpoint, ?string $body = null): array { - $url = $this->giteaUrl . $endpoint; + $url = $this->gitUrl . $endpoint; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/cli/ci_issue_reporter.sh b/cli/ci_issue_reporter.sh index 63bfcad..4706453 100644 --- a/cli/ci_issue_reporter.sh +++ b/cli/ci_issue_reporter.sh @@ -10,7 +10,7 @@ # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI # PATH: /cli/ci_issue_reporter.sh # VERSION: 10.00.00 -# BRIEF: Creates or updates a Gitea issue when a CI gate fails. +# BRIEF: Creates or updates a Git issue when a CI gate fails. # Deduplicates by searching open issues with the "ci-auto" label # whose title matches the gate. If a matching issue exists, a comment # is appended instead of opening a duplicate. @@ -19,10 +19,10 @@ set -euo pipefail # ── Defaults ──────────────────────────────────────────────────────────────── -MOKOGITEA_URL="${MOKOGITEA_URL:-https://git.mokoconsulting.tech}" -MOKOGITEA_TOKEN="${MOKOGITEA_TOKEN:-}" +MOKOGIT_URL="${MOKOGIT_URL:-https://git.mokoconsulting.tech}" +MOKOGIT_TOKEN="${MOKOGIT_TOKEN:-}" REPO="${GITHUB_REPOSITORY:-}" -RUN_URL="${GITHUB_SERVER_URL:-${MOKOGITEA_URL}}/${REPO}/actions/runs/${GITHUB_RUN_ID:-0}" +RUN_URL="${GITHUB_SERVER_URL:-${MOKOGIT_URL}}/${REPO}/actions/runs/${GITHUB_RUN_ID:-0}" LABEL_NAME="ci-auto" LABEL_COLOR="#e11d48" @@ -45,8 +45,8 @@ Optional: --workflow Workflow name for the issue title --repo owner/repo (default: \$GITHUB_REPOSITORY) --run-url URL to the CI run (auto-detected from env) - --token Gitea API token (default: \$MOKOGITEA_TOKEN) - --url Gitea base URL (default: \$MOKOGITEA_URL) + --token Git API token (default: \$MOKOGIT_TOKEN) + --url Git base URL (default: \$MOKOGIT_URL) EOF exit 1 } @@ -59,8 +59,8 @@ while [[ $# -gt 0 ]]; do --workflow) WORKFLOW="$2"; shift 2 ;; --repo) REPO="$2"; shift 2 ;; --run-url) RUN_URL="$2"; shift 2 ;; - --token) MOKOGITEA_TOKEN="$2"; shift 2 ;; - --url) MOKOGITEA_URL="$2"; shift 2 ;; + --token) MOKOGIT_TOKEN="$2"; shift 2 ;; + --url) MOKOGIT_URL="$2"; shift 2 ;; -h|--help) usage ;; *) echo "Unknown option: $1"; usage ;; esac @@ -68,10 +68,10 @@ done [[ -z "$GATE" ]] && { echo "ERROR: --gate is required"; usage; } [[ -z "$DETAILS" ]] && { echo "ERROR: --details is required"; usage; } -[[ -z "$MOKOGITEA_TOKEN" ]] && { echo "ERROR: MOKOGITEA_TOKEN not set"; exit 1; } +[[ -z "$MOKOGIT_TOKEN" ]] && { echo "ERROR: MOKOGIT_TOKEN not set"; exit 1; } [[ -z "$REPO" ]] && { echo "ERROR: GITHUB_REPOSITORY not set"; exit 1; } -API="${MOKOGITEA_URL}/api/v1/repos/${REPO}" +API="${MOKOGIT_URL}/api/v1/repos/${REPO}" # ── Build title ───────────────────────────────────────────────────────────── if [[ -n "$WORKFLOW" ]]; then @@ -84,19 +84,19 @@ fi ensure_label() { local exists exists=$(curl -sf -o /dev/null -w '%{http_code}' \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/labels" 2>/dev/null || echo "000") if [[ "$exists" == "200" ]]; then local found found=$(curl -sf \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/labels" 2>/dev/null \ | grep -o "\"name\":\"${LABEL_NAME}\"" || true) if [[ -z "$found" ]]; then curl -sf -X POST \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ -H "Content-Type: application/json" \ "${API}/labels" \ -d "{\"name\":\"${LABEL_NAME}\",\"color\":\"${LABEL_COLOR}\",\"description\":\"Auto-created by CI issue reporter\"}" \ @@ -112,7 +112,7 @@ find_existing_issue() { local response response=$(curl -sf \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/issues?type=issues&state=open&labels=${LABEL_NAME}&q=${query}&limit=5" \ 2>/dev/null || echo "[]") @@ -148,7 +148,7 @@ ${DETAILS} Fix the issue described above and push a new commit. This issue will be closed automatically when the gate passes, or can be closed manually. --- -*Auto-created by [ci-issue-reporter](${MOKOGITEA_URL}/MokoConsulting/MokoCLI/src/branch/main/cli/ci_issue_reporter.sh)* +*Auto-created by [ci-issue-reporter](${MOKOGIT_URL}/MokoConsulting/MokoCLI/src/branch/main/cli/ci_issue_reporter.sh)* BODY } @@ -177,7 +177,7 @@ import sys, json print(json.dumps({'body': sys.stdin.read()}))" 2>/dev/null) HTTP=$(curl -sf -o /dev/null -w '%{http_code}' -X POST \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ -H "Content-Type: application/json" \ "${API}/issues/${EXISTING}/comments" \ -d "${COMMENT_JSON}" 2>/dev/null || echo "000") @@ -199,7 +199,7 @@ print(json.dumps({ }))" "$TITLE" <<< "$ISSUE_BODY" 2>/dev/null) RESPONSE=$(curl -sf -X POST \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ -H "Content-Type: application/json" \ "${API}/issues" \ -d "${ISSUE_JSON}" 2>/dev/null || echo "{}") @@ -208,14 +208,14 @@ print(json.dumps({ if [[ -n "$ISSUE_NUM" ]]; then LABEL_ID=$(curl -sf \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ "${API}/labels" 2>/dev/null \ | grep -oP "\"id\":\s*\K[0-9]+(?=[^}]*\"name\":\s*\"${LABEL_NAME}\")" \ | head -1 || true) if [[ -n "$LABEL_ID" ]]; then curl -sf -X POST \ - -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + -H "Authorization: token ${MOKOGIT_TOKEN}" \ -H "Content-Type: application/json" \ "${API}/issues/${ISSUE_NUM}/labels" \ -d "{\"labels\":[${LABEL_ID}]}" \ diff --git a/cli/client_dashboard.php b/cli/client_dashboard.php index 02e4054..c05f909 100644 --- a/cli/client_dashboard.php +++ b/cli/client_dashboard.php @@ -24,7 +24,7 @@ use MokoCli\CliFramework; class ClientDashboardCli extends CliFramework { - private string $giteaUrl = 'https://git.mokoconsulting.tech'; + private string $gitUrl = 'https://git.mokoconsulting.tech'; private string $token = ''; private string $org = 'MokoConsulting'; private string $outputFile = ''; @@ -36,8 +36,8 @@ class ClientDashboardCli extends CliFramework protected function configure(): void { $this->setDescription('Generate unified client dashboard HTML'); - $this->addArgument('--token', 'Gitea token (or MOKOGITEA_TOKEN)', ''); - $this->addArgument('--gitea-url', 'Gitea URL', 'https://git.mokoconsulting.tech'); + $this->addArgument('--token', 'Git token (or MOKOGIT_TOKEN)', ''); + $this->addArgument('--git-url', 'Git URL', 'https://git.mokoconsulting.tech'); $this->addArgument('--org', 'Primary org (default: MokoConsulting)', 'MokoConsulting'); $this->addArgument('--output', 'Output HTML file (default: stdout)', ''); $this->addArgument('-o', 'Output HTML file (alias)', ''); @@ -48,7 +48,7 @@ class ClientDashboardCli extends CliFramework protected function run(): int { - $this->giteaUrl = rtrim($this->getArgument('--gitea-url'), '/'); + $this->gitUrl = rtrim($this->getArgument('--git-url'), '/'); $this->token = $this->getArgument('--token'); $this->org = $this->getArgument('--org'); $this->outputFile = $this->getArgument('--output') ?: $this->getArgument('-o'); @@ -57,11 +57,11 @@ class ClientDashboardCli extends CliFramework $this->sslWarnDays = (int) $this->getArgument('--ssl-warn-days'); if ($this->token === '') { - $this->token = getenv('MOKOGITEA_TOKEN') ?: ''; + $this->token = getenv('MOKOGIT_TOKEN') ?: ''; } if ($this->token === '') { - $this->log('ERROR', '--token or MOKOGITEA_TOKEN required.'); + $this->log('ERROR', '--token or MOKOGIT_TOKEN required.'); return 1; } @@ -460,7 +460,7 @@ CARD; /** @return array{code: int, body: string} */ private function api(string $method, string $endpoint): array { - $url = $this->giteaUrl . $endpoint; + $url = $this->gitUrl . $endpoint; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); diff --git a/cli/client_inventory.php b/cli/client_inventory.php index e6de097..3529038 100644 --- a/cli/client_inventory.php +++ b/cli/client_inventory.php @@ -24,21 +24,21 @@ use MokoCli\CliFramework; class ClientInventoryCli extends CliFramework { - private string $giteaUrl = 'https://git.mokoconsulting.tech'; + private string $gitUrl = 'https://git.mokoconsulting.tech'; private string $token = ''; private bool $jsonOutput = false; protected function configure(): void { $this->setDescription('Discover and list all client-waas repos with their server configuration status'); - $this->addArgument('--gitea-url', 'Gitea URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); - $this->addArgument('--token', 'Gitea API token', ''); + $this->addArgument('--git-url', 'Git URL (default: https://git.mokoconsulting.tech)', 'https://git.mokoconsulting.tech'); + $this->addArgument('--token', 'Git API token', ''); $this->addArgument('--json', 'Output results as JSON', false); } protected function run(): int { - $this->giteaUrl = rtrim($this->getArgument('--gitea-url'), '/'); + $this->gitUrl = rtrim($this->getArgument('--git-url'), '/'); $this->token = $this->getArgument('--token'); $this->jsonOutput = (bool) $this->getArgument('--json'); @@ -47,7 +47,7 @@ class ClientInventoryCli extends CliFramework return 1; } - $this->log('INFO', "Scanning Gitea instance: {$this->giteaUrl}"); + $this->log('INFO', "Scanning Git instance: {$this->gitUrl}"); // Step 1: List all orgs $orgs = $this->fetchOrgs(); @@ -241,7 +241,7 @@ class ClientInventoryCli extends CliFramework private function apiRequest(string $method, string $endpoint, ?string $body = null): array { - $url = $this->giteaUrl . $endpoint; + $url = $this->gitUrl . $endpoint; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/cli/client_provision.php b/cli/client_provision.php index f56a5cd..c066a82 100644 --- a/cli/client_provision.php +++ b/cli/client_provision.php @@ -24,8 +24,8 @@ use MokoCli\CliFramework; class ClientProvisionCli extends CliFramework { - private string $giteaUrl = 'https://git.mokoconsulting.tech'; - private string $giteaToken = ''; + private string $gitUrl = 'https://git.mokoconsulting.tech'; + private string $gitToken = ''; private string $grafanaUrl = ''; private string $grafanaToken = ''; private string $configFile = ''; @@ -65,17 +65,17 @@ class ClientProvisionCli extends CliFramework return 1; } - $this->giteaToken = $this->config['gitea_token'] - ?? getenv('MOKOGITEA_TOKEN') ?: ''; + $this->gitToken = $this->config['git_token'] + ?? getenv('MOKOGIT_TOKEN') ?: ''; $this->grafanaUrl = $this->config['grafana_url'] ?? getenv('GRAFANA_URL') ?: ''; $this->grafanaToken = $this->config['grafana_token'] ?? getenv('GRAFANA_TOKEN') ?: ''; - $this->giteaUrl = $this->config['gitea_url'] - ?? $this->giteaUrl; + $this->gitUrl = $this->config['git_url'] + ?? $this->gitUrl; - if ($this->giteaToken === '') { - $this->log('ERROR', 'gitea_token or MOKOGITEA_TOKEN required.'); + if ($this->gitToken === '') { + $this->log('ERROR', 'git_token or MOKOGIT_TOKEN required.'); return 1; } @@ -128,7 +128,7 @@ class ClientProvisionCli extends CliFramework { $this->log('INFO', '[1/5] Creating repository...'); - $check = $this->giteaApi( + $check = $this->gitApi( 'GET', "/api/v1/repos/{$this->org}/{$this->repoName}" ); @@ -153,7 +153,7 @@ class ClientProvisionCli extends CliFramework 'labels' => true, ]); - $resp = $this->giteaApi( + $resp = $this->gitApi( 'POST', '/api/v1/repos/MokoConsulting/' . 'Template-Client/generate', @@ -167,7 +167,7 @@ class ClientProvisionCli extends CliFramework $this->log('INFO', ' OK: Repo created'); - $this->giteaApi( + $this->gitApi( 'POST', "/api/v1/repos/{$this->org}/{$this->repoName}/branches", json_encode([ @@ -250,7 +250,7 @@ class ClientProvisionCli extends CliFramework continue; } - $resp = $this->giteaApi( + $resp = $this->gitApi( 'PUT', "{$api}/{$name}", json_encode(['data' => $value]) @@ -391,7 +391,7 @@ class ClientProvisionCli extends CliFramework echo "\n"; $this->log('INFO', '[5/5] Provisioning summary'); echo str_repeat('=', 60) . "\n"; - echo " Repo: {$this->giteaUrl}/{$this->org}/{$this->repoName}\n"; + echo " Repo: {$this->gitUrl}/{$this->org}/{$this->repoName}\n"; echo ' Variables: ' . count($vars) . " set\n"; echo ' Secrets: ' . count($secrets) . " set\n"; echo "\n"; @@ -409,14 +409,14 @@ class ClientProvisionCli extends CliFramework string $name, string $value ): bool { - $resp = $this->giteaApi( + $resp = $this->gitApi( 'PUT', "{$api}/{$name}", json_encode(['value' => $value]) ); if ($resp['code'] === 404) { - $resp = $this->giteaApi( + $resp = $this->gitApi( 'POST', $api, json_encode(['name' => $name, 'value' => $value]) @@ -426,15 +426,15 @@ class ClientProvisionCli extends CliFramework return $resp['code'] >= 200 && $resp['code'] < 300; } - private function giteaApi( + private function gitApi( string $method, string $endpoint, ?string $body = null ): array { return $this->httpRequest( - $this->giteaUrl . $endpoint, + $this->gitUrl . $endpoint, $method, - "token {$this->giteaToken}", + "token {$this->gitToken}", $body ); } diff --git a/cli/create_project.php b/cli/create_project.php index a80a733..8d79f8a 100644 --- a/cli/create_project.php +++ b/cli/create_project.php @@ -81,7 +81,7 @@ class CreateProjectCli extends CliFramework } $config = \MokoCli\Config::load(); - $platformName = $config->getString('platform', 'gitea'); + $platformName = $config->getString('platform', 'git'); try { $adapter = \MokoCli\PlatformAdapterFactory::create($config); $api = $adapter->getApiClient(); @@ -89,8 +89,8 @@ class CreateProjectCli extends CliFramework $this->log('ERROR', "Platform initialization failed: " . $e->getMessage()); return 1; } - $token = $platformName === 'gitea' - ? $config->getString('gitea.token', '') + $token = $platformName === 'git' + ? $config->getString('git.token', '') : $config->getString('github.token', ''); $repoRoot = dirname(__DIR__, 2); @@ -173,7 +173,7 @@ class CreateProjectCli extends CliFramework return $failed > 0 ? 1 : 0; } - private function graphql(string $query, array $variables, string $token, string $platformName = 'gitea'): array + private function graphql(string $query, array $variables, string $token, string $platformName = 'git'): array { if ($platformName !== 'github') { return []; @@ -223,7 +223,7 @@ class CreateProjectCli extends CliFramework private function detectRepoPlatform(string $org, string $repo, string $token, ?\MokoCli\ApiClient $apiClient = null): string { - foreach (['.github/.mokostandards', '.mokogitea/.mokostandards', '.mokostandards'] as $path) { + foreach (['.github/.mokostandards', '.mokogit/.mokostandards', '.mokostandards'] as $path) { $data = $this->restGet("repos/{$org}/{$repo}/contents/{$path}", $token, $apiClient); if (!empty($data['content'])) { $content = base64_decode($data['content']); diff --git a/cli/create_repo.php b/cli/create_repo.php index 5cb01d4..743e967 100644 --- a/cli/create_repo.php +++ b/cli/create_repo.php @@ -116,14 +116,14 @@ class CreateRepoCli extends CliFramework echo " (dry-run) would set topics: " . implode(', ', $topics) . "\n"; } - echo "Step 3: Creating .mokogitea/manifest.xml...\n"; + echo "Step 3: Creating .mokogit/manifest.xml...\n"; $mokoContent = "platform: {$platform}\nversion: 04.02.30\nmanaged: true\n"; if (!$this->dryRun) { try { $adapter->createOrUpdateFile( $org, $name, - '.mokogitea/manifest.xml', + '.mokogit/manifest.xml', $mokoContent, 'chore: add manifest.xml platform config [skip ci]' ); @@ -132,11 +132,11 @@ class CreateRepoCli extends CliFramework echo " Warning: " . $e->getMessage() . "\n"; } } else { - echo " (dry-run) would create .mokogitea/manifest.xml\n"; + echo " (dry-run) would create .mokogit/manifest.xml\n"; } echo "Step 4: Creating README.md...\n"; - $baseUrl = $platformName === 'gitea' ? $config->getString('gitea.url', 'https://git.mokoconsulting.tech') : 'https://github.com'; + $baseUrl = $platformName === 'git' ? $config->getString('git.url', 'https://git.mokoconsulting.tech') : 'https://github.com'; $repoUrl = "{$baseUrl}/{$org}/{$name}"; $standardsUrl = "{$baseUrl}/{$org}/MokoCli"; $readmeContent = "