Push a workflow file from moko-platform to all non-archived repos in an
org via the Gitea Contents API. Compares content before pushing — skips
repos where the file is identical, creates where missing, updates where
changed. Supports --dry-run for safe preview.
Closes#52
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Was cascading entries for all lower channels on stable release,
producing wrong download URLs for non-existent channel releases.
Now writes only the entry for the current stability level;
the preserve logic retains entries from other channels.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The complex regex ((5.[0-9])|(6.[0-9])) caused Gitea's web view to
return 500 when rendering the XML. Simplified to (5|6)\..* which is
Joomla-compatible and XML-safe.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When building a dev release, the CLI was overwriting the entire
updates.xml with only the dev entry, wiping the stable channel.
Now reads existing entries and preserves channels not being updated.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same duplication bug as joomla_build.php — uses <packagename> for
packages and strips existing type prefixes before prepending.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Was only globbing src/*.xml, missing src/packages/*/*.xml. Joomla
packages have sub-extension manifests that also need version updates.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
parseManifest() was falling back to the filename (pkg_mokowaas.xml →
pkg_mokowaas) as the element, then typePrefix() prepended another pkg_.
Now uses <packagename> for packages and strips existing type prefixes
from the element before prepending.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously version_bump.php only read from README.md VERSION header,
ignoring the actual manifest XML version. When a version was manually
bumped in the manifest (e.g. 02.03.00) but README still showed an
older version (02.01.45), the CLI would bump from README's version
instead, producing wrong release numbers.
Now both tools check README.md AND Joomla manifest XML files
(pkg_*.xml, src/*.xml, packages/*/*.xml) and use whichever version
is higher as the base for bumping/reading.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- release_verify.php: Post-release artifact verification (ZIP integrity,
manifest version, SHA256 vs updates.xml, disallowed files check)
- release_validate.php: Pre-release sanity checks (version consistency
across README, CHANGELOG, manifest, updates.xml, composer.json)
- release_body_update.php: Update Gitea release body with changelog
extract and checksums table via API
- dev_branch_reset.php: Delete and recreate dev branch from main via
Gitea API
Resolves: #56, #60, #62, #64
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added .mokogitea/manifest.xml XML lookup (new format)
- Added .mokogitea/.mokostandards fallback (legacy)
- Platform 'joomla' now handled alongside 'waas-component'
This was the root cause of manifest version not updating during releases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The release tag is 'development' but the CLI was generating download
URLs with tag 'dev', causing Joomla update downloads to 404.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update REPO: from MokoStandards-API to moko-platform in 125 files
- Fix wrong org path (mokoconsulting-tech → MokoConsulting) in 10 files
- Fix SPDX-LICENSE-IDENTIFIER case in 2 template files
- Add missing REPO: field to 3 files
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove VERSION: XX.YY.ZZ lines from 213 file headers across PHP,
TypeScript, TF definitions, workflows, CSS, markdown, and XML files.
Version is tracked in composer.json and CHANGELOG.md only.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added resolveLabelIds() helper: looks up label IDs from Gitea API
- All issue creation/update calls now pass integer label IDs (Gitea requirement)
- Replaced hardcoded 'jmiller-moko' (GitHub) with 'jmiller' (Gitea) in
bulk_sync.php, push_files.php, archive_repo.php
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- All PHP files in cli/, deploy/, maintenance/ had __DIR__ . '/../../vendor/autoload.php'
(from when they lived at /api/cli/ inside MokoStandards). Fixed to /../vendor/autoload.php
- Workflow templates updated to clone MokoStandards-API.git and reference /cli/, /deploy/,
/maintenance/ paths instead of /api/cli/, /api/deploy/, /api/maintenance/
Affects: 11 PHP files + 11 workflow templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- RepositorySynchronizer defaults to GiteaAdapter
- PlatformAdapterFactory points to git.mokoconsulting.tech
- All plugins reference .gitea/workflows instead of .github/workflows
- push_files.php uses Gitea API
- Common.php REPO URLs updated to Gitea
- sync_dolibarr_readmes.php updated to Gitea URLs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- cli/create_project.php: use PlatformAdapterFactory, guard GraphQL for GitHub-only
- cli/joomla_release.php: use adapter for API init, platform-aware clone/upload URLs
- release/generate_joomla_update_xml.php: use PlatformAdapterFactory for API init
- release/generate_dolibarr_version_txt.php: same
- validate/scan_drift.php: use PlatformAdapterFactory for API init
- validate/check_repo_health.php: use platform-aware API base URL
- validate/check_composer_deps.php: route through adapter ApiClient
- maintenance/repo_inventory.php: route through adapter ApiClient, guard GraphQL
- maintenance/rotate_secrets.php: route through adapter ApiClient
- maintenance/update_version_from_readme.php: use PlatformAdapterFactory, rename method
- lib/Common.php: set primary REPO_URL to Gitea
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>