Commit Graph

18 Commits

Author SHA1 Message Date
Jonathan Miller 2bfbc2d89d refactor: sync engine clones template repos at runtime for workflows
No longer references local templates/workflows/ — instead clones
the canonical template repo (Joomla/Dolibarr/Generic/Client) at
sync time to get the latest workflow files directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 18:17:53 -05:00
Jonathan Miller a4fbcc0f87 refactor: update sync engine to use new canonical workflow sources
- Replace old .template files with actual workflow YMLs from template repos
- Update RepositorySynchronizer to use new 10/11-workflow standard
- Remove legacy shared workflows (enterprise-firewall, auto-assign, etc.)
- Joomla workflows sourced from MokoStandards-Template-Joomla
- Dolibarr workflows sourced from MokoStandards-Template-Dolibarr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 18:12:50 -05:00
Jonathan Miller abc08fb6f2 docs: update for consolidated Joomla template repo
- Update WORKFLOW_STANDARDS.md to reference MokoStandards-Template-Joomla
- Remove 6 obsolete sync definitions for deleted individual template repos
- Update sync commands to use unified template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 17:41:28 -05:00
Jonathan Miller 8758570216 fix: migrate .mokostandards from .github/ to .gitea/ on Gitea
migrateMokoStandards() now checks both root and .github/.mokostandards
as sources, migrating to .gitea/.mokostandards when running on Gitea.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:47:01 -05:00
Jonathan Miller 5548eae35d chore: add debug logging to workflow sync deduplication 2026-04-26 15:54:43 -05:00
Jonathan Miller 531e462d9d fix: use API repo root for template resolution in bulk sync
syncFilesToBranch was resolving template paths against $standardsRoot
(../MokoStandards) instead of $repoRoot (the API repo where templates
actually live). This caused all template-sourced entries to silently
fail with "Source file not found", resulting in 0 files synced.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 15:41:22 -05:00
Jonathan Miller ff07d0a563 fix: prevent self-referencing composer dependency in enterprise package
ensureComposerEnterprise() now skips repos whose composer.json name
matches 'mokoconsulting-tech/enterprise' to avoid the package requiring
itself. Also removes the re-added self-reference from composer.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 11:55:10 -05:00
Jonathan Miller 2a84875a4e fix: repair bulk sync — array assignment bug + add missing workflow mappings
- Line 876: change $entries = to $entries[] = (was overwriting all shared
  workflow entries, causing every repo to be skipped with empty result)
- Add deploy-rs, export-mysql, pull-from-dev to shared workflows (all platforms)
- Add deploy-dev, deploy-demo, deploy.yml to waas-component platform
- This fix restores the bulk-repo-sync ability to push workflow templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 00:16:38 -05:00
Jonathan Miller c00a04087f Fix: protected files skip entirely before stale token check
Protected files (like updates.xml) were being overwritten because
the stale-token check ran AFTER the canOverwrite gate. Now protected
files continue (skip) immediately, even with --force.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 14:10:14 -05:00
Jonathan Miller 0f9f110c2d Gitea-primary: update definitions, sync lib, token guidance
- waas-component.tf: 27 lines — GitHub URLs→Gitea, GA_TOKEN guidance,
  gitea-actions[bot], jmiller username
- joomla-template.tf: same pattern
- RepositorySynchronizer.php: jmiller-moko→jmiller

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 12:45:23 -05:00
Jonathan Miller 7b863f690d fix: remove all stale api/ path references across PHP codebase
Updated ~60 files: comments, usage docs, SCRIPT_PATH constants,
wrapper paths, require paths, error messages, and help text.
All api/validate/ → validate/, api/automation/ → automation/, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 19:18:22 -05:00
Jonathan Miller bd53fe834f feat: add gitignore validation, move bulk-repo-sync workflow here
- Add REQUIRED_GITIGNORE_ENTRIES constant with mandatory patterns:
  Sublime project/workspace, sftp-config, IDE dirs, secrets, vendor, logs
- Add validateGitignoreEntries() method for checking required entries
- mergeGitConfigFile() still appends missing entries (non-destructive)
- Add .gitea/workflows/bulk-repo-sync.yml (moved from MokoStandards)
  - Runs from this repo directly (checkout self, not remote)
  - Org updated to MokoConsulting (Gitea)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 18:17:24 -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 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 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
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