Commit Graph

27 Commits

Author SHA1 Message Date
Jonathan Miller 70d93fcfa3 Add ensureReleaseTags: create development/beta/release-candidate tags on sync
Ensures all repos have standard release channel tags pointing to
the default branch. Tags are created if missing, skipped if they exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
beta development release-candidate
2026-04-17 05:45:31 -05:00
jmiller 259cd87b74 chore: add mokoconsulting-tech/enterprise dependency 2026-04-17 10:33:26 +00:00
Jonathan Miller 89c7dc0091 Fix bulk_sync: resolve label names to IDs, fix username jmiller-moko → jmiller
- 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>
2026-04-17 05:30:59 -05:00
Jonathan Miller ce3d63b4db Fix Python heredoc: use os.environ instead of shell var expansion
Quoted heredoc (<< 'PYEOF') prevents shell expansion of ${VAR}.
Pass values via exported env vars and read with os.environ in Python.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 05:16:52 -05:00
Jonathan Miller e43802bcb2 Update default-repository.json: Gitea-primary, required workflows list
- .github description updated: Gitea primary, GitHub backup
- Added requiredFiles list for standard shared workflows
- workflows directory now requirementStatus: required

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 23:24:46 -05:00
Jonathan Miller fd66d46da3 Replace shivammathur/setup-php with php -v verification
PHP is pre-installed in custom runner image (moko/runner-image:latest).
shivammathur/setup-php is incompatible with Gitea act_runner DinD.
25 workflow templates updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 23:19:09 -05:00
Jonathan Miller 551307efed Complete Gitea-primary migration: templates, docs, bot identity
- All remaining github-actions[bot] → gitea-actions[bot]
- All remaining gh api calls in non-mirror steps → Gitea API curl
- COMPOSER_AUTH uses GA_TOKEN for Gitea composer registry
- 7 docs updated with correct bot identity and token refs
- gh release create/edit only remains in GitHub mirror sections

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 23:00:59 -05:00
Jonathan Miller db0c7771bc Convert all gh CLI calls to Gitea API curl across workflow templates
- gh release view/create/edit/upload → Gitea API curl
- gh api → Gitea API curl with GA_TOKEN
- Download URLs point to Gitea as primary
- GitHub mirror steps preserved with continue-on-error for stable/rc

Affects: 11 workflow templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 22:45:09 -05:00
Jonathan Miller 13ef483e11 Gitea-primary tokens: GA_TOKEN for Gitea API, GH_TOKEN for GitHub mirror
- All Gitea API calls use secrets.GA_TOKEN (org-level Gitea PAT)
- secrets.GITHUB_TOKEN → secrets.GA_TOKEN across all templates
- secrets.GH_TOKEN reserved for GitHub mirror operations only
- Bot identity: gitea-actions[bot]@mokoconsulting.tech
- gh CLI commands kept only in GitHub mirror steps (continue-on-error)
- gh api calls in auto-assign/auto-dev-issue converted to curl

Affects: 20 workflow templates + 2 standalone yml files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 22:38:49 -05:00
Jonathan Miller 96c7bd9e46 docs: update all references to MokoConsulting org and Gitea URLs
- mokoconsulting-tech → MokoConsulting across all docs
- github.com → git.mokoconsulting.tech
- CLI examples updated with new org name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 22:21:59 -05:00
Jonathan Miller 661f84b9c7 feat: add all templates from MokoStandards
Templates moved from MokoStandards repo:
- templates/configs/ (editor, linting, composer configs)
- templates/docs/ (required + extra doc templates)
- templates/gitea/ (issue templates, CLAUDE.md, copilot-instructions)
- templates/github/ (legacy, kept for reference)
- templates/joomla/ (Joomla component/module/plugin templates)
- templates/makefiles/ (build automation)
- templates/schemas/ (JSON/XML schemas)
- templates/scripts/ (PHP script templates)
- templates/stubs/ (Dolibarr/Joomla stubs)
- templates/build/, fonts/, images/, licenses/, security/, web/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:23:09 -05:00
Jonathan Miller 12382e30cc fix: split repoRoot into apiRoot + standardsRoot
- Definitions load from MokoStandards-API (repoRoot = API repo)
- Template files load from MokoStandards (standardsRoot = sibling dir)
- Set MOKOSTANDARDS_ROOT env var to override template source location

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:18:44 -05:00
Jonathan Miller 5ddd507f7b Fix autoload paths and workflow templates for standalone repo structure
- 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>
2026-04-16 19:18:01 -05:00
Jonathan Miller d690b16741 Merge branch 'main' of https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
# Conflicts:
#	composer.json
2026-04-16 19:13:17 -05:00
Jonathan Miller f42791464a Migrate workflow templates to reference MokoStandards-API
All templates now clone MokoStandards-API.git (this repo) instead of
MokoStandards.git for CLI tools. Path mappings:
- /tmp/mokostandards → /tmp/mokostandards-api
- /api/cli/ → /cli/
- /api/deploy/ → /deploy/
- /api/maintenance/ → /maintenance/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:12:25 -05:00
Jonathan Miller 4f2d000f16 feat: sync to all branches, add listBranches, add ext-zip
- RepositorySynchronizer now syncs files to ALL branches (main + dev + any others)
- Extract syncFilesToBranch() method for per-branch file operations
- Add GiteaAdapter::listBranches() method
- Add ext-zip to composer.json require
- Fix Guzzle base_uri resolution (trailing slash + strip leading slash)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:11:47 -05:00
Jonathan Miller 1ea4b4f042 chore: add ext-zip to composer.json require
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:00:03 -05:00
jmiller d7297c1e35 chore: add mokoconsulting-tech/enterprise dependency 2026-04-16 23:52:46 +00:00
Jonathan Miller ed9313e6cb fix: Guzzle base_uri resolution for Gitea API paths
Strip leading slash from endpoints and ensure base_uri has trailing slash
so Guzzle preserves the /api/v1 path prefix per RFC 3986.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:52:04 -05:00
Jonathan Miller 8e908266d9 feat: migrate to Gitea-only workflows and API 2026-04-16 17:44:37 -05:00
Jonathan Miller b0cc468155 feat: migrate to Gitea-only workflows and API
- 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>
2026-04-16 17:40:18 -05:00
Jonathan Miller fa0b5b7865 fix: update all workflow templates for Gitea Actions compatibility
- Add GA_TOKEN to token fallback chain across all 25 workflow templates
  (secrets.GA_TOKEN || secrets.GH_TOKEN || github.token)
- Replace hardcoded MokoStandards clone URLs with platform-detecting
  MOKO_CLONE_TOKEN/MOKO_CLONE_HOST env vars in 11 templates
- Replace actions/github-script@v7 with shell-based API calls in
  repo_health (Joomla + Dolibarr) and validate-joomla-project
- Replace hardcoded ApiClient('api.github.com') with PlatformAdapterFactory
  in health-check.yml and integration-tests.yml
- Add TODO markers for terraform github-script blocks (complex logic)
- Update publish-to-mokodolimods token references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 22:43:31 -05:00
Jonathan Miller e96a851617 fix: replace all hardcoded GitHub API URLs with platform adapter pattern
- 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>
2026-04-14 22:12:41 -05:00
jmiller 0b80fec88d feat: add templates, CLI dirs, docs, and Gitea-first platform config 2026-04-15 02:35:30 +00:00
Jonathan Miller bc0bff9022 feat: dual-platform support (Gitea + GitHub) and Joomla template tooling
- Add web URL helpers to GitPlatformAdapter interface (getRepoWebUrl,
  getPullRequestWebUrl, getIssueWebUrl, getBranchWebUrl, getMetadataDir,
  getStepSummaryEnvVar) with implementations in both adapters
- Refactor bulk_sync, push_files, repo_cleanup to use PlatformAdapterFactory
  instead of hardcoded GitHub API URLs and raw curl calls
- Fix RepositorySynchronizer override file and .mokostandards migration to
  use platform-aware metadata directories
- Add joomla-template platform type with full definition and detection
- Add bulk_joomla_template.php CLI tool (scaffold, sync, list, sync-updates)
- Dual update servers in templateDetails.xml (Gitea priority 1, GitHub priority 2)
- Dual download URLs in updates.xml (Gitea primary, GitHub fallback)
- Target Joomla 5.x and 6.x, PHP 8.1 minimum

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:16:28 -05:00
Claude Code 5e63faf229 Initial: MokoStandards Enterprise API extracted from MokoStandards
Standalone Composer package (mokoconsulting-tech/enterprise).
Source: api/, bin/, lib/ directories from MokoStandards main repo.
Autoload paths updated for standalone layout.
2026-04-13 06:12:04 +00:00
jmiller e60fa539b2 Initial commit 2026-04-13 06:11:22 +00:00