fix: stale .mokogitea/workflows refs in scaffolding cause .mokogit/.mokogit nesting #352

Closed
opened 2026-07-16 18:59:24 +00:00 by jmiller · 2 comments
Owner

Summary

Half-migrated .mokogitea -> .mokogit references in the shared CLI scaffolding are the root cause of the .mokogit/.mokogit/ nested-directory bug observed across repos during the MokoGitea -> MokoGIT rebrand.

workflow_sync.php was migrated (it writes to .mokogit/workflows/ by basename, correctly), and the template repos (Template-Generic, Template-Joomla) are clean/flat. But other tools still scaffold/look-up the OLD .mokogitea/workflows/ path. When a repo is scaffolded with .mokogitea/ while workflow_sync writes the migrated .mokogit/, a later directory rename collides (mv .mokogitea .mokogit into an existing .mokogit) and produces .mokogit/.mokogit/.

Stale .mokogitea/workflows/ references to fix (nesting-relevant)

  • cli/repo_wizard.php:159 — scaffolds .mokogitea/workflows/pr-check.yml
  • cli/release.php:40-41 — looks for .mokogitea/workflows/bulk-repo-sync.yml
  • cli/bulk_workflow_push.php:39,73 — default dest .mokogitea/workflows/<filename>

Change these to .mokogit/workflows/ to match the template source-of-truth and workflow_sync.php.

Out of scope for this issue (separate concern)

~30 .mokogitea/manifest.xml references across the version/release scripts (version_read.php, version_bump.php, version_check.php, version_set_platform.php, version_auto_bump.php, release_create.php, release_package.php, release_validate.php, version_reset_dev.php, manifest_element.php, manifest_licensing.php, deploy_joomla.php, create_repo.php). That's the repo metadata manifest (now API-managed / deleted per the fork workflow), a different migration than the workflows dir. Do NOT lump it in here — changing the manifest path blindly risks breaking version/release reads across all repos.

Verification done

  • MokoSuiteBackup dev/main: no nested .mokogit/.mokogit/.
  • Template-Generic / Template-Joomla .mokogit/: clean, flat.
  • workflow_sync.php Phase 1/2 use $workflow['name'] (basename) + WORKFLOW_DIR = '.mokogit/workflows' -> cannot nest.

Reported from a MokoSuiteBackup session; filed here since the fix belongs in the shared tooling.

## Summary Half-migrated `.mokogitea` -> `.mokogit` references in the shared CLI scaffolding are the root cause of the `.mokogit/.mokogit/` **nested-directory bug** observed across repos during the MokoGitea -> MokoGIT rebrand. `workflow_sync.php` was migrated (it writes to `.mokogit/workflows/` by basename, correctly), and the template repos (Template-Generic, Template-Joomla) are clean/flat. But other tools still scaffold/look-up the OLD `.mokogitea/workflows/` path. When a repo is scaffolded with `.mokogitea/` while `workflow_sync` writes the migrated `.mokogit/`, a later directory rename collides (`mv .mokogitea .mokogit` into an existing `.mokogit`) and produces `.mokogit/.mokogit/`. ## Stale `.mokogitea/workflows/` references to fix (nesting-relevant) - `cli/repo_wizard.php:159` — scaffolds `.mokogitea/workflows/pr-check.yml` - `cli/release.php:40-41` — looks for `.mokogitea/workflows/bulk-repo-sync.yml` - `cli/bulk_workflow_push.php:39,73` — default dest `.mokogitea/workflows/<filename>` Change these to `.mokogit/workflows/` to match the template source-of-truth and `workflow_sync.php`. ## Out of scope for this issue (separate concern) ~30 `.mokogitea/manifest.xml` references across the version/release scripts (`version_read.php`, `version_bump.php`, `version_check.php`, `version_set_platform.php`, `version_auto_bump.php`, `release_create.php`, `release_package.php`, `release_validate.php`, `version_reset_dev.php`, `manifest_element.php`, `manifest_licensing.php`, `deploy_joomla.php`, `create_repo.php`). That's the repo *metadata* manifest (now API-managed / deleted per the fork workflow), a different migration than the workflows dir. Do NOT lump it in here — changing the manifest path blindly risks breaking version/release reads across all repos. ## Verification done - MokoSuiteBackup dev/main: no nested `.mokogit/.mokogit/`. - Template-Generic / Template-Joomla `.mokogit/`: clean, flat. - `workflow_sync.php` Phase 1/2 use `$workflow['name']` (basename) + `WORKFLOW_DIR = '.mokogit/workflows'` -> cannot nest. Reported from a MokoSuiteBackup session; filed here since the fix belongs in the shared tooling.
Author
Owner

Branch created: feature/352-fix-stale-mokogitea-workflows-refs-in-sc

git fetch origin
git checkout feature/352-fix-stale-mokogitea-workflows-refs-in-sc
Branch created: [`feature/352-fix-stale-mokogitea-workflows-refs-in-sc`](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/src/branch/feature/352-fix-stale-mokogitea-workflows-refs-in-sc) ```bash git fetch origin git checkout feature/352-fix-stale-mokogitea-workflows-refs-in-sc ```
Author
Owner

Resolved: stale .mokogitea/workflows scaffolding refs repointed to .mokogit/workflows across repo_wizard/release/bulk_workflow_push/UnifiedValidation; the .mokogit/.mokogit nesting was cleaned org-wide. Closing.

Resolved: stale .mokogitea/workflows scaffolding refs repointed to .mokogit/workflows across repo_wizard/release/bulk_workflow_push/UnifiedValidation; the .mokogit/.mokogit nesting was cleaned org-wide. Closing.
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCLI#352