Public Access
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1655e2a0ae | |||
| 4aef631244 | |||
| 6b2cf099f7 | |||
| fefa44965f | |||
| 2b7e38b711 | |||
| 3ed575906f |
@@ -5,7 +5,7 @@
|
||||
# FILE INFORMATION
|
||||
# DEFGROUP: Gitea.Workflow
|
||||
# INGROUP: mokocli.Automation
|
||||
# VERSION: 09.31.00
|
||||
# VERSION: 09.32.00
|
||||
# BRIEF: Auto-create feature branch when an issue is opened
|
||||
|
||||
name: "Universal: Issue Branch"
|
||||
|
||||
+4
-4
@@ -12,6 +12,10 @@ BRIEF: Release changelog
|
||||
# Changelog
|
||||
## [Unreleased]
|
||||
|
||||
## [09.32.00] --- 2026-06-21
|
||||
|
||||
## [09.32.00] --- 2026-06-21
|
||||
|
||||
## [09.31.00] --- 2026-06-21
|
||||
|
||||
## [09.31.00] --- 2026-06-21
|
||||
@@ -37,7 +41,3 @@ BRIEF: Release changelog
|
||||
- Renamed `MokoEnterprise` namespace → `MokoCli` across all files
|
||||
- Renamed `MokoStandardsParser` class → `ManifestParser`
|
||||
- Fixed `composer.json` autoload paths: `src/` → `source/`
|
||||
|
||||
## [09.29.00] --- 2026-06-09
|
||||
|
||||
## [09.28.00] --- 2026-06-07
|
||||
|
||||
@@ -6,7 +6,7 @@ DEFGROUP: MokoPlatform.Root
|
||||
INGROUP: MokoPlatform
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
PATH: /README.md
|
||||
VERSION: 09.31.00
|
||||
VERSION: 09.32.00
|
||||
BRIEF: Project overview and documentation
|
||||
-->
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/branch_rename.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Rename a git branch via Gitea API (create new, update PR, delete old)
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/bulk_workflow_push.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Push a workflow file to all governed repos via the Gitea Contents API
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/bulk_workflow_trigger.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Trigger a workflow across multiple repos at once
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/client_dashboard.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Generate unified client dashboard HTML
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/client_inventory.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Discover and list all client-waas repos with their server configuration status
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/client_provision.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Provision a new client environment end-to-end
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/grafana_dashboard.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Manage Grafana dashboards via API
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/joomla_build.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Build a Joomla extension ZIP from manifest — all types supported
|
||||
* NOTE: Called by pre-release and auto-release workflows.
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/joomla_metadata_validate.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Validate MokoGitea repo metadata against Joomla extension manifest XML
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/manifest_detect.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Auto-detect manifest fields from source files and optionally push to API
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/manifest_integrity.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Cross-check manifest API fields against repo contents across the org
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/manifest_licensing.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Ensure licensing tags (updateservers, dlid) in Joomla extension manifests
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokocli
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||
* PATH: /cli/manifest_read.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Read repo metadata from Gitea manifest API, auto-detect the rest
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/platform_detect.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Auto-detect repository platform type and optionally update manifest
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokocli
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||
* PATH: /cli/release_cascade.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Cascade release zip to all lower stability channels
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/release_publish.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Publish a release and create copies for all lesser stability streams.
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/scaffold_client.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Scaffold a new client-waas repo from Template-Client-WaaS with pre-configured settings
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/updates_xml_sync.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Sync updates.xml to target branches via Gitea API
|
||||
* NOTE: Called by pre-release and auto-release workflows after updates.xml
|
||||
* is modified on the current branch. Pushes the file to other branches
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/version_auto_bump.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Auto patch-bump, set stability suffix, and commit — single CLI replacing inline workflow bash
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/version_check.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Validate version consistency across README, manifests, and sub-packages
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
* INGROUP: mokoplatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /cli/wiki_sync.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Sync select wiki pages from mokoplatform to all template repos
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INGROUP: moko-platform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
|
||||
* PATH: /cli/workflow_sync.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Sync workflows from Generic → platform templates → live repos based on manifest.platform
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /deploy/backup-before-deploy.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Snapshot Joomla directories before deployment for rollback capability
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /deploy/deploy-dolibarr.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Deploy Dolibarr module files to a remote server via SFTP/rsync
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /deploy/health-check.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Post-deploy health check — verify a Joomla site is responding correctly
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /deploy/rollback-joomla.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Rollback a Joomla deployment by restoring from a pre-deploy snapshot
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /deploy/sync-joomla.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Sync Joomla site directories between two servers via rsync over SSH
|
||||
*/
|
||||
|
||||
|
||||
@@ -51,17 +51,29 @@ class SourceResolver
|
||||
*/
|
||||
private const CANDIDATES = ['source', 'src', 'htdocs'];
|
||||
|
||||
/** Cache of API-resolved entry points keyed by "org/repo". */
|
||||
private static array $apiCache = [];
|
||||
|
||||
/**
|
||||
* Resolve the source directory name for a repository root.
|
||||
*
|
||||
* Returns the first candidate directory that exists, or 'source' as the
|
||||
* default when no candidate is found (e.g. for new repos being scaffolded).
|
||||
* Resolution order:
|
||||
* 1. Gitea Manifest API `entry_point` (when GA_TOKEN/GITEA_TOKEN + GITHUB_REPOSITORY are set)
|
||||
* 2. First candidate directory that exists on the filesystem
|
||||
* 3. 'source' as the default (e.g. for new repos being scaffolded)
|
||||
*
|
||||
* @param string $root Absolute path to the repository root.
|
||||
* @return string Directory name (e.g. 'source', 'src', 'htdocs').
|
||||
*/
|
||||
public static function resolve(string $root): string
|
||||
{
|
||||
// Try API first (CI environments where token + repo are available)
|
||||
$apiResult = self::resolveFromApi($root);
|
||||
if ($apiResult !== null) {
|
||||
return $apiResult;
|
||||
}
|
||||
|
||||
// Filesystem fallback
|
||||
foreach (self::CANDIDATES as $candidate) {
|
||||
if (is_dir("{$root}/{$candidate}")) {
|
||||
return $candidate;
|
||||
@@ -71,6 +83,92 @@ class SourceResolver
|
||||
return 'source';
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the MokoGitea Manifest API for the entry_point field.
|
||||
*
|
||||
* Only attempts the call when GA_TOKEN or GITEA_TOKEN is set. Results are
|
||||
* cached per org/repo for the lifetime of the process.
|
||||
*
|
||||
* @param string $root Repository root (used to derive org/repo from git remote).
|
||||
* @return string|null Directory name from entry_point, or null if unavailable.
|
||||
*/
|
||||
public static function resolveFromApi(string $root): ?string
|
||||
{
|
||||
$token = getenv('GA_TOKEN') ?: getenv('GITEA_TOKEN') ?: '';
|
||||
if ($token === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
[$org, $repo] = self::resolveOrgRepo($root);
|
||||
if ($org === '' || $repo === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
$cacheKey = "{$org}/{$repo}";
|
||||
if (array_key_exists($cacheKey, self::$apiCache)) {
|
||||
return self::$apiCache[$cacheKey];
|
||||
}
|
||||
|
||||
$baseUrl = rtrim(getenv('GITEA_URL') ?: 'https://git.mokoconsulting.tech', '/');
|
||||
$url = "{$baseUrl}/api/v1/repos/{$org}/{$repo}/manifest";
|
||||
|
||||
$ctx = stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Authorization: token {$token}\r\nAccept: application/json\r\n",
|
||||
'timeout' => 5,
|
||||
'ignore_errors' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
$body = @file_get_contents($url, false, $ctx);
|
||||
if ($body === false) {
|
||||
self::$apiCache[$cacheKey] = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
$status = 0;
|
||||
if (isset($http_response_header[0])) {
|
||||
preg_match('/\d{3}/', $http_response_header[0], $m);
|
||||
$status = (int) ($m[0] ?? 0);
|
||||
}
|
||||
if ($status < 200 || $status >= 300) {
|
||||
self::$apiCache[$cacheKey] = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = json_decode($body, true);
|
||||
$entryPoint = $data['entry_point'] ?? '';
|
||||
|
||||
// Normalize: "source/" → "source", "cli/" → "cli"
|
||||
$result = ($entryPoint !== '') ? rtrim($entryPoint, '/') : null;
|
||||
|
||||
self::$apiCache[$cacheKey] = $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve org/repo from GITHUB_REPOSITORY env or git remote.
|
||||
*
|
||||
* @return array{0: string, 1: string}
|
||||
*/
|
||||
private static function resolveOrgRepo(string $root): array
|
||||
{
|
||||
$envRepo = getenv('GITHUB_REPOSITORY') ?: '';
|
||||
if ($envRepo !== '' && str_contains($envRepo, '/')) {
|
||||
return explode('/', $envRepo, 2);
|
||||
}
|
||||
|
||||
$remoteUrl = trim((string) @shell_exec(
|
||||
'git -C ' . escapeshellarg($root) . ' remote get-url origin 2>/dev/null'
|
||||
));
|
||||
|
||||
if ($remoteUrl !== '' && preg_match('#[/:]([^/]+)/([^/]+?)(?:\.git)?$#', $remoteUrl, $m)) {
|
||||
return [$m[1], $m[2]];
|
||||
}
|
||||
|
||||
return ['', ''];
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the source directory as an absolute path.
|
||||
*
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
DEFGROUP: dolibarr-api-mcp.Documentation
|
||||
INGROUP: dolibarr-api-mcp
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp
|
||||
VERSION: 09.31.00
|
||||
VERSION: 09.32.00
|
||||
PATH: ./CONTRIBUTING.md
|
||||
BRIEF: Contribution guidelines for the project
|
||||
-->
|
||||
|
||||
@@ -10,7 +10,7 @@ DEFGROUP: dolibarr-api-mcp.Documentation
|
||||
INGROUP: dolibarr-api-mcp
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp
|
||||
PATH: /SECURITY.md
|
||||
VERSION: 09.31.00
|
||||
VERSION: 09.32.00
|
||||
BRIEF: Security vulnerability reporting and handling policy
|
||||
-->
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
DEFGROUP:
|
||||
INGROUP: Project.Documentation
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCli-Template-Generic
|
||||
VERSION: 09.31.00
|
||||
VERSION: 09.32.00
|
||||
PATH: ./CONTRIBUTING.md
|
||||
BRIEF: Contribution guidelines for the project
|
||||
-->
|
||||
|
||||
@@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME]
|
||||
INGROUP: [PROJECT_NAME].Documentation
|
||||
REPO: [REPOSITORY_URL]
|
||||
PATH: /SECURITY.md
|
||||
VERSION: 09.31.00
|
||||
VERSION: 09.32.00
|
||||
BRIEF: Security vulnerability reporting and handling policy
|
||||
-->
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class VersionBumpTest extends TestCase
|
||||
{
|
||||
file_put_contents(
|
||||
"{$this->tmpDir}/README.md",
|
||||
"<!-- VERSION: 09.31.00 -->\nSome content\n"
|
||||
"<!-- VERSION: 09.32.00 -->\nSome content\n"
|
||||
);
|
||||
|
||||
$this->execute();
|
||||
|
||||
@@ -34,7 +34,7 @@ class VersionReadTest extends TestCase
|
||||
{
|
||||
file_put_contents(
|
||||
"{$this->tmpDir}/README.md",
|
||||
"# Test\n<!-- VERSION: 09.31.00 -->\n"
|
||||
"# Test\n<!-- VERSION: 09.32.00 -->\n"
|
||||
);
|
||||
|
||||
$this->assertSame('02.03.04', trim($this->runScript()));
|
||||
@@ -68,7 +68,7 @@ class VersionReadTest extends TestCase
|
||||
{
|
||||
file_put_contents(
|
||||
"{$this->tmpDir}/README.md",
|
||||
"<!-- VERSION: 09.31.00 -->\n"
|
||||
"<!-- VERSION: 09.32.00 -->\n"
|
||||
);
|
||||
mkdir("{$this->tmpDir}/src", 0755, true);
|
||||
file_put_contents(
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* INGROUP: MokoPlatform
|
||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
|
||||
* PATH: /validate/check_file_integrity.php
|
||||
* VERSION: 09.31.00
|
||||
* VERSION: 09.32.00
|
||||
* BRIEF: Compare deployed files on a remote server against the local repository to detect drift
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user