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>
This commit is contained in:
Jonathan Miller
2026-04-16 22:21:59 -05:00
parent 661f84b9c7
commit 96c7bd9e46
57 changed files with 435 additions and 256 deletions
+3 -3
View File
@@ -2,8 +2,8 @@
PHP implementation of MokoStandards — enterprise standards, automation framework, workflow templates, and bulk sync tooling.
> **Primary platform**: [Gitea — git.mokoconsulting.tech](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API)
> **Backup mirror**: [GitHub](https://github.com/mokoconsulting-tech/MokoStandards-API) *(read-only mirror)*
> **Primary platform**: [Gitea — git.mokoconsulting.tech](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API)
> **Backup mirror**: [GitHub](https://github.com/MokoConsulting/MokoStandards-API) *(read-only mirror)*
## What Lives Here
@@ -62,7 +62,7 @@ vendor/bin/moko inventory -- --path .
| `GA_TOKEN` | Gitea API / Gitea Actions token |
| `GH_TOKEN` | GitHub API token (for mirror sync) |
| `GITEA_URL` | Gitea instance URL (default: `https://git.mokoconsulting.tech`) |
| `GITEA_ORG` | Gitea organization (default: `mokoconsulting-tech`) |
| `GITEA_ORG` | Gitea organization (default: `MokoConsulting`) |
## License
+2 -2
View File
@@ -204,7 +204,7 @@ All files must include:
# FILE INFORMATION
# DEFGROUP: [Group]
# INGROUP: [Parent Group]
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
# PATH: [Relative path from repo root]
# VERSION: [X.Y.Z] # Version is dynamically read from README.md title line
# BRIEF: [One-line description]
@@ -359,4 +359,4 @@ All changes documented in `CHANGELOG.md` following Keep a Changelog format.
**Maintained by**: Moko Consulting
**Questions**: hello@mokoconsulting.tech
**Repository**: https://github.com/mokoconsulting-tech/MokoStandards
**Repository**: https://github.com/MokoConsulting/MokoStandards
+1 -1
View File
@@ -71,7 +71,7 @@ python3 scripts/auto_create_org_projects.py --org your-org-name
### Combined Options
```bash
python3 scripts/auto_create_org_projects.py --dry-run --verbose --org mokoconsulting-tech
python3 scripts/auto_create_org_projects.py --dry-run --verbose --org MokoConsulting
```
## What It Does
+6 -6
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/automation/index.md
VERSION: 04.06.00
BRIEF: API reference for automation scripts in api/automation/
@@ -31,16 +31,16 @@ and opens Pull Requests with the changes.
```bash
# Dry-run sync for the entire org
php api/automation/bulk_sync.php --org mokoconsulting-tech --dry-run
php api/automation/bulk_sync.php --org MokoConsulting --dry-run
# Sync specific repositories
php api/automation/bulk_sync.php --org mokoconsulting-tech --repos "repo-a,repo-b"
php api/automation/bulk_sync.php --org MokoConsulting --repos "repo-a,repo-b"
# Exclude repos and skip archived
php api/automation/bulk_sync.php --org mokoconsulting-tech --exclude "legacy-repo" --skip-archived
php api/automation/bulk_sync.php --org MokoConsulting --exclude "legacy-repo" --skip-archived
# Auto-approve PRs (non-interactive)
php api/automation/bulk_sync.php --org mokoconsulting-tech --yes
php api/automation/bulk_sync.php --org MokoConsulting --yes
```
| Option | Description |
@@ -78,7 +78,7 @@ php api/automation/push_files.php --files=templates/foo.txt:docs/foo.txt --repos
| Option | Description |
|--------|-------------|
| `--org <name>` | GitHub organization (default: mokoconsulting-tech) |
| `--org <name>` | GitHub organization (default: MokoConsulting) |
| `--repos <list>` | Target repositories — comma-separated (required) |
| `--files <list>` | Files to push — destination paths or `source:dest` pairs (required) |
| `--message <msg>` | Custom commit message |
+1 -1
View File
@@ -160,7 +160,7 @@ Definitions are automatically regenerated on each bulk sync. To manually regener
```bash
# Regenerate definition for a specific repository
php api/automation/bulk_sync.php \
--repos mokoconsulting-tech/MyRepo \
--repos MokoConsulting/MyRepo \
--regenerate-definitions
```
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/deploy/index.md
VERSION: 04.06.00
BRIEF: API reference for deployment scripts in api/deploy/
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/fix/index.md
VERSION: 04.06.00
BRIEF: API reference for automated fix scripts in api/fix/
+1 -1
View File
@@ -254,7 +254,7 @@ php api/deploy/deploy-sftp.php --path /path/to/project
```bash
# Sync templates to multiple repositories
php api/automation/bulk_sync.php \
--org mokoconsulting-tech \
--org MokoConsulting \
--repos "repo1,repo2,repo3"
```
+3 -3
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/maintenance/index.md
VERSION: 04.06.00
BRIEF: API reference for housekeeping and maintenance scripts in api/maintenance/
@@ -151,7 +151,7 @@ php api/maintenance/rotate_secrets.php --all --json
| `--repo <name>` | Audit a single repo |
| `--json` | Machine-readable JSON output |
| `--create-issue` | Post/update audit results as a GitHub issue |
| `--org <name>` | GitHub organization (default: `mokoconsulting-tech`) |
| `--org <name>` | GitHub organization (default: `MokoConsulting`) |
---
@@ -171,7 +171,7 @@ php api/maintenance/repo_inventory.php --json
|--------|-------------|
| `--dry-run` | Preview without posting issue |
| `--json` | JSON output to stdout |
| `--org <name>` | GitHub organization (default: `mokoconsulting-tech`) |
| `--org <name>` | GitHub organization (default: `MokoConsulting`) |
---
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/plugin/index.md
VERSION: 04.06.00
BRIEF: API reference for plugin runner scripts in api/plugin_*.php
+5 -5
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation.API
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/api/validate/index.md
VERSION: 04.06.00
BRIEF: API reference for all validation scripts in api/validate/
@@ -233,9 +233,9 @@ Scans multiple repositories in a GitHub organization for divergence from
MokoStandards templates. Can create GitHub issues in drifted repos.
```bash
php api/validate/scan_drift.php --org mokoconsulting-tech
php api/validate/scan_drift.php --org mokoconsulting-tech --type dolibarr --json
php api/validate/scan_drift.php --org mokoconsulting-tech --create-issues --threshold 20
php api/validate/scan_drift.php --org MokoConsulting
php api/validate/scan_drift.php --org MokoConsulting --type dolibarr --json
php api/validate/scan_drift.php --org MokoConsulting --create-issues --threshold 20
```
| Option | Description |
@@ -267,7 +267,7 @@ php api/validate/check_composer_deps.php --all --json
| `--repo <name>` | Check a single repository |
| `--all` | Check all governed repos |
| `--json` | Machine-readable JSON output |
| `--org <name>` | GitHub organization (default: `mokoconsulting-tech`) |
| `--org <name>` | GitHub organization (default: `MokoConsulting`) |
---
+1 -1
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Automation Documentation
+1 -1
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
> **⚠️ DEPRECATED DOCUMENTATION**
> **Status**: REMOVED — This Python-based automation system has been replaced by PHP scripts. See api/automation/.
+3 -3
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/automation/push-files.md
VERSION: 04.06.00
BRIEF: Guide for push_files.php — push specific files to selected repositories
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Push Files
@@ -40,7 +40,7 @@ php api/automation/push_files.php --repos MokoCRM --files "LICENSE" --yes --no-i
| Flag | Description |
|------|-------------|
| `--org` | GitHub organization (default: mokoconsulting-tech) |
| `--org` | GitHub organization (default: MokoConsulting) |
| `--repos` | Target repositories (space-separated, required) |
| `--files` | Files to push (space-separated, required) |
| `--direct` | Push directly to main (no PR) |
+3 -3
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/automation/repo-cleanup.md
VERSION: 04.06.00
BRIEF: Guide for repo_cleanup.php and the repository-cleanup.yml recurring maintenance workflow
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Repository Cleanup
@@ -105,7 +105,7 @@ php api/automation/repo_cleanup.php --repos MokoCRM --yes
| Flag | Description |
|------|-------------|
| `--org` | GitHub organization (default: mokoconsulting-tech) |
| `--org` | GitHub organization (default: MokoConsulting) |
| `--repos` | Specific repos to clean (space-separated) |
| `--close-issues` | Close tracking issues where the linked PR has been merged |
| `--skip-archived` | Skip archived repositories |
+2 -2
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# GitHub Workflow Templates Documentation
@@ -572,7 +572,7 @@ For issues with templates:
|---|---|
| Document | Workflow Templates Documentation |
| Path | /docs/workflows/README.md |
| Repository | https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards |
| Repository | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards |
| Owner | Moko Consulting |
| Status | Active |
| Version | 04.00.04 |
+2 -2
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/auto-release.md
VERSION: 04.06.00
BRIEF: Guide for the auto-release workflow — creates GitHub Releases on merge to main
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Auto Release
+1 -1
View File
@@ -6,7 +6,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/build-release.md
VERSION: 04.06.00
BRIEF: Build & Release pipeline — unified workflow for version branches, tags, and GitHub Releases
+3 -3
View File
@@ -21,13 +21,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Workflow
INGROUP: MokoStandards.Documentation
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/bulk-repo-sync.md
VERSION: 04.06.00
BRIEF: Comprehensive documentation for the bulk repository sync workflow
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
![Enterprise Ready](https://img.shields.io/badge/enterprise-ready-green)
![Security Validated](https://img.shields.io/badge/security-validated-green)
@@ -757,7 +757,7 @@ For questions or issues:
1. **Documentation**: Review this guide and related documentation
2. **Dry Run**: Test with dry-run mode to diagnose issues
3. **Logs**: Check workflow logs for detailed error messages
4. **Issues**: Open issue in [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/issues)
4. **Issues**: Open issue in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/issues)
### Contributing
+2 -2
View File
@@ -8,13 +8,13 @@
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API/
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API/
VERSION: 04.06.00
PATH: /docs/workflows/changelog-management.md
BRIEF: Documentation for changelog management workflows and scripts
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Changelog Management System
+2 -2
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/demo-deployment.md
VERSION: 04.06.00
BRIEF: Guide for the SFTP demo server deployment workflow
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Demo Server Deployment
+2 -2
View File
@@ -6,13 +6,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/dev-branch-tracking.md
VERSION: 04.06.00
BRIEF: Dev branch tracking and issue coordination system documentation
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Dev Branch Tracking and Issue Coordination
+3 -3
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/dev-deployment.md
VERSION: 04.06.00
BRIEF: Guide for the SFTP development server deployment workflow
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Development Server Deployment
@@ -264,7 +264,7 @@ Expected behaviour for repos without a `src/` directory. No files are uploaded;
| Applies To | All Repositories |
| Jurisdiction | Tennessee, USA |
| Owner | Moko Consulting |
| Repo | https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards |
| Repo | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards |
| Path | /docs/workflows/dev-deployment.md |
| Version | 04.06.00 |
| Status | Active |
+1 -1
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Docs Index: /docs/workflows
+2 -2
View File
@@ -6,13 +6,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/release-system.md
VERSION: 04.06.00
BRIEF: Documentation for the unified release system
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Release System
+5 -5
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Reserve Dolibarr Module ID Workflow
@@ -30,7 +30,7 @@ The `reserve-dolibarr-module-id.yml` workflow automates the reservation of Dolib
**File**: `.github/workflows/reserve-dolibarr-module-id.yml`
**Trigger**: Manual (workflow_dispatch)
**Permissions**: `contents: write`, `pull-requests: write`
**Repository**: [https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
**Repository**: [https://git.mokoconsulting.tech/MokoConsulting/MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
## Architecture
@@ -246,7 +246,7 @@ Reserved: 2026-02-19 16:30:00 UTC
DO NOT CHANGE THIS ID!
This ID is registered in the MokoStandards module registry:
https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/development/crm/module-registry.md
https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/development/crm/module-registry.md
```
If `push_to_remote` is disabled (default), you can manually create this file and update the module descriptor later.
@@ -280,7 +280,7 @@ The workflow generates a summary with:
**Module Name:** MokoDoliExample
**Reserved ID:** 185064
**Repository:** https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliExample
**Pull Request:** https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/pull/123
**Pull Request:** https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/pull/123
### Next Steps
1. The GitHub Actions workflow has created the pull request above automatically
@@ -679,7 +679,7 @@ For issues or questions about this workflow:
| Applies To | MokoStandards Repository |
| Jurisdiction | Tennessee, USA |
| Owner | Moko Consulting |
| Repo | https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards |
| Repo | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards |
| Path | /docs/workflows/reserve-dolibarr-module-id.md |
| Version | 04.00.04 |
| Status | Active |
+32 -32
View File
@@ -8,13 +8,13 @@
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API/
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API/
VERSION: 04.06.00
PATH: /docs/workflows/reusable-workflows.md
BRIEF: Documentation for reusable GitHub Actions workflows
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Reusable Workflows
@@ -26,14 +26,14 @@ MokoStandards provides seven reusable GitHub Actions workflows that enable consi
# Basic quality check
jobs:
quality:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
# Type-aware build and release
build:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-build.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-build.yml@main
release:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-release.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-release.yml@main
with:
version: '1.0.0'
```
@@ -68,7 +68,7 @@ Runs comprehensive PHP code quality checks using PHPCS, PHPStan, and Psalm with
```yaml
jobs:
quality:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
with:
php-versions: '["8.1", "8.2"]'
tools: '["phpcs", "phpstan", "psalm"]'
@@ -93,7 +93,7 @@ Matrix testing for Joomla extensions across PHP and Joomla versions with PHPUnit
```yaml
jobs:
test:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
with:
php-versions: '["8.1", "8.2"]'
joomla-versions: '["4.4", "5.0", "5.1"]'
@@ -118,7 +118,7 @@ Repository standards validation with configurable profiles (basic, full, strict)
```yaml
jobs:
validate:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
with:
profile: 'full'
validate-security: true
@@ -149,7 +149,7 @@ Automatically cleans up stale and merged branches with configurable exclusion pa
```yaml
jobs:
cleanup:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-branch-cleanup.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-branch-cleanup.yml@main
with:
stale-days: 90
delete-merged: true
@@ -178,7 +178,7 @@ jobs:
```yaml
jobs:
cleanup:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-branch-cleanup.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-branch-cleanup.yml@main
with:
stale-days: 60
delete-merged: true
@@ -200,7 +200,7 @@ Automatically detects project type and provides outputs for downstream workflows
```yaml
jobs:
detect:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-project-detector.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-project-detector.yml@main
```
**Outputs:**
@@ -217,7 +217,7 @@ Universal build workflow that adapts to project type with automatic dependency m
```yaml
jobs:
build:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-build.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-build.yml@main
with:
php-version: '8.1'
node-version: '20.x'
@@ -243,7 +243,7 @@ Creates releases with type-specific packaging and marketplace support.
```yaml
jobs:
release:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-release.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-release.yml@main
with:
version: '1.0.0'
prerelease: false
@@ -272,7 +272,7 @@ Multi-environment deployment with type-specific logic and health checks.
```yaml
jobs:
deploy:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: staging
deployment-method: rsync
@@ -326,11 +326,11 @@ permissions:
jobs:
# Auto-detect project type
detect:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-project-detector.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-project-detector.yml@main
# Validate code
validate:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
with:
profile: 'full'
@@ -338,7 +338,7 @@ jobs:
quality:
needs: detect
if: needs.detect.outputs.has-php == 'true'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
with:
php-versions: '["8.1", "8.2"]'
@@ -346,7 +346,7 @@ jobs:
test:
needs: [detect, quality]
if: needs.detect.outputs.project-type == 'joomla'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
with:
php-versions: '["8.1", "8.2"]'
coverage: true
@@ -356,13 +356,13 @@ jobs:
# Build (works for all types)
build:
needs: [detect, validate]
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-build.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-build.yml@main
# Deploy to staging
deploy-staging:
needs: build
if: github.ref == 'refs/heads/staging'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: staging
deployment-method: rsync
@@ -372,7 +372,7 @@ jobs:
release:
needs: [detect, build]
if: startsWith(github.ref, 'refs/tags/v')
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-release.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-release.yml@main
with:
version: ${{ github.ref_name }}
@@ -380,7 +380,7 @@ jobs:
deploy-production:
needs: release
if: github.event_name == 'release'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: production
version: ${{ github.event.release.tag_name }}
@@ -398,19 +398,19 @@ on: [push, pull_request]
jobs:
validate:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
with:
profile: 'full'
quality:
needs: validate
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
with:
php-versions: '["8.1", "8.2"]'
test:
needs: quality
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
with:
coverage: true
secrets:
@@ -425,17 +425,17 @@ jobs:
**Recommended:** Pin to main branch for automatic updates
```yaml
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
```
**Stable:** Pin to specific tag
```yaml
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@v1.0.0
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@v1.0.0
```
**Maximum Stability:** Pin to commit SHA
```yaml
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@abc1234
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@abc1234
```
### Secret Management
@@ -461,14 +461,14 @@ jobs:
# Dev branches: basic validation
validate-dev:
if: startsWith(github.ref, 'refs/heads/dev/')
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
with:
profile: 'basic'
# Main branch: strict validation
validate-main:
if: github.ref == 'refs/heads/main'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
with:
profile: 'strict'
fail-on-warnings: true
@@ -479,7 +479,7 @@ jobs:
## Troubleshooting
### Workflow Not Found
**Error:** `Unable to resolve action mokoconsulting-tech/MokoStandards/.github/workflows/...`
**Error:** `Unable to resolve action MokoConsulting/MokoStandards/.github/workflows/...`
**Solution:** Ensure calling repository has access to MokoStandards. For private repositories, configure proper access permissions.
@@ -536,7 +536,7 @@ jobs:
# After: Reusable workflow
jobs:
quality:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
with:
phpcs-standard: 'PSR12'
tools: '["phpcs"]'
+2 -2
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/rs-deployment.md
VERSION: 04.06.00
BRIEF: Guide for the SFTP release staging server deployment workflow
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Release Staging (RS) Server Deployment
+2 -2
View File
@@ -8,13 +8,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/shared-workflows.md
VERSION: 04.06.00
BRIEF: Reference for shared workflow templates synced to all governed repos
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Shared Workflow Templates
+1 -1
View File
@@ -1,4 +1,4 @@
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Standards Compliance Workflow
+1 -1
View File
@@ -17,7 +17,7 @@ Use sub-issues when:
### Method 1: Using the Issue Template (Manual)
1. Go to the [New Issue page](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/issues/new/choose)
1. Go to the [New Issue page](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/issues/new/choose)
2. Select the "Sub-Task" template
3. Fill in the required fields:
- **Parent Issue**: The issue number this sub-task belongs to (e.g., #193)
+1 -1
View File
@@ -6,7 +6,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/update-server.md
VERSION: 04.06.00
BRIEF: How update files (update.txt and updates.xml) are generated per platform
+14 -14
View File
@@ -21,13 +21,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/workflow-architecture.md
VERSION: 04.06.00
BRIEF: Workflow architecture, hierarchy, and design patterns
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Workflow Architecture
@@ -103,7 +103,7 @@ Moko Consulting uses a three-tier architecture for GitHub Actions workflows:
### Tier 2: Public Reusable Workflows
**Location**: `mokoconsulting-tech/MokoStandards/.github/workflows/`
**Location**: `MokoConsulting/MokoStandards/.github/workflows/`
**Characteristics**:
- Public and community-accessible
@@ -160,17 +160,17 @@ Automatically detect project type and execute appropriate build/test strategy.
```yaml
jobs:
detect:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-project-detector.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-project-detector.yml@main
build-joomla:
needs: detect
if: needs.detect.outputs.project-type == 'joomla'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-joomla-testing.yml@main
build-generic:
needs: detect
if: needs.detect.outputs.project-type == 'generic'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-build.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-build.yml@main
```
**Benefits**:
@@ -186,18 +186,18 @@ Build complex workflows by composing simple reusable workflows.
jobs:
# Step 1: Validate code
validate:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-ci-validation.yml@main
# Step 2: Build if validation passes
build:
needs: validate
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-build.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-build.yml@main
# Step 3: Deploy if build passes
deploy:
needs: build
if: github.ref == 'refs/heads/main'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
secrets: inherit
```
@@ -218,7 +218,7 @@ jobs:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
os: [ubuntu-latest, windows-latest]
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-php-quality.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-php-quality.yml@main
with:
php-version: ${{ matrix.php-version }}
```
@@ -236,13 +236,13 @@ Deploy to different environments based on branch or tag.
jobs:
deploy-staging:
if: github.ref == 'refs/heads/dev'
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: staging
deploy-production:
if: startsWith(github.ref, 'refs/tags/v')
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: production
```
@@ -275,7 +275,7 @@ on:
jobs:
deploy:
uses: mokoconsulting-tech/MokoStandards/.github/workflows/reusable-deploy.yml@main
uses: MokoConsulting/MokoStandards/.github/workflows/reusable-deploy.yml@main
with:
environment: ${{ inputs.environment }}
dry-run: ${{ inputs.dry-run }}
@@ -546,7 +546,7 @@ jobs:
## Metadata
* **Document**: .github/WORKFLOW_ARCHITECTURE.md
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
* **Owner**: Moko Consulting Engineering Team
* **Scope**: Workflow architecture and design patterns
* **Lifecycle**: Active
+2 -2
View File
@@ -6,13 +6,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Workflows
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /docs/workflows/workflow-inventory.md
VERSION: 04.06.00
BRIEF: Complete inventory of GitHub Actions workflows for migration planning
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# GitHub Actions Workflow Inventory
+3 -3
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Templates
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/configs/README.md
VERSION: 04.06.00
BRIEF: Code quality and security tool configuration templates
@@ -298,8 +298,8 @@ These tools work seamlessly with:
## Support and Updates
Configuration templates are maintained in the MokoStandards repository:
- **Repository**: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
- **Documentation**: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/tree/main/docs
- **Repository**: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
- **Documentation**: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/tree/main/docs
- **Issues**: Report problems or suggest improvements via GitHub Issues
## Version History
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Templates
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/docs/dolibarr/update-server.md
VERSION: 04.06.00
BRIEF: Developer guide for wiring up Dolibarr module update checks — synced to docs/ in all CRM repos
+4 -4
View File
@@ -24,7 +24,7 @@
BRIEF: Project governance rules, roles, and decision process for {{repo_name}}
-->
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
# Project Governance
@@ -32,10 +32,10 @@
This document defines the governance model for the `{{repo_name}}` repository within the
`{{org}}` organization. It is automatically maintained by
[MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards) v{{standards_version}}.
[MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) v{{standards_version}}.
Full governance policy is defined in the MokoStandards source repository:
[docs/policy/GOVERNANCE.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/GOVERNANCE.md)
[docs/policy/GOVERNANCE.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/GOVERNANCE.md)
---
@@ -80,7 +80,7 @@ available. The following requirements remain mandatory regardless:
4. **Documentation** — changes are documented in `CHANGELOG.md`.
See the full policy:
[Sole Operator Policy](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/GOVERNANCE.md#sole-operator-policy)
[Sole Operator Policy](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/GOVERNANCE.md#sole-operator-policy)
---
@@ -24,7 +24,7 @@
Thank you for your interest in contributing to **{{REPO_NAME}}**!
This repository is governed by **[MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)** — the authoritative source of coding standards, workflows, and policies for all Moko Consulting repositories.
This repository is governed by **[MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)** — the authoritative source of coding standards, workflows, and policies for all Moko Consulting repositories.
## Branch Strategy
@@ -84,16 +84,16 @@ When your PR is merged to `main`, these workflows run automatically:
## Coding Standards
All contributions must follow [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards):
All contributions must follow [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards):
| Standard | Reference |
|----------|-----------|
| Coding Style | [coding-style-guide.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) |
| File Headers | [file-header-standards.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) |
| Branching | [branch-release-strategy.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branch-release-strategy.md) |
| Merge Strategy | [merge-strategy.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) |
| Scripting | [scripting-standards.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/scripting-standards.md) |
| Build & Release | [build-release.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/workflows/build-release.md) |
| Coding Style | [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/coding-style-guide.md) |
| File Headers | [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/file-header-standards.md) |
| Branching | [branch-release-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/branch-release-strategy.md) |
| Merge Strategy | [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/merge-strategy.md) |
| Scripting | [scripting-standards.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/scripting-standards.md) |
| Build & Release | [build-release.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/workflows/build-release.md) |
## PR Checklist
@@ -125,4 +125,4 @@ By contributing, you agree that your contributions will be licensed under the [G
---
*This file is synced from [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards). Do not edit directly — changes will be overwritten on the next sync.*
*This file is synced from [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards). Do not edit directly — changes will be overwritten on the next sync.*
+2 -2
View File
@@ -24,7 +24,7 @@ BRIEF: {{REPO_DESCRIPTION}}
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[VERSION: 04.06.00]
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-orange)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
> {{REPO_DESCRIPTION}}
@@ -42,7 +42,7 @@ BRIEF: {{REPO_DESCRIPTION}}
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. This repository follows [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards).
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. This repository follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards).
## License
@@ -16,7 +16,7 @@ BRIEF: How this module's update server file (update.txt) is managed
# Dolibarr Update Server
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
This document explains how `update.txt` is automatically managed for this Dolibarr module.
@@ -67,4 +67,4 @@ The `repo_health.yml` workflow verifies on every commit:
---
*Managed by [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards). See [docs/workflows/update-server.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/workflows/update-server.md) for the full specification.*
*Managed by [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards). See [docs/workflows/update-server.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/workflows/update-server.md) for the full specification.*
@@ -16,7 +16,7 @@ BRIEF: How this extension's Joomla update server file (updates.xml) is managed
# Joomla Update Server
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
[![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-blue)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
This document explains how `updates.xml` is automatically managed for this Joomla extension following the [Joomla Update Server specification](https://docs.joomla.org/Deploying_an_Update_Server).
@@ -119,4 +119,4 @@ The `repo_health.yml` workflow verifies on every commit:
---
*Managed by [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards). See [docs/workflows/update-server.md](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/workflows/update-server.md) for the full specification.*
*Managed by [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards). See [docs/workflows/update-server.md](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/workflows/update-server.md) for the full specification.*
@@ -92,7 +92,7 @@ List Dolibarr hooks this module will use:
### ID Range Preference
Based on the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md):
Based on the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md):
**Preferred Range** (will be assigned by coordinator):
- [ ] Internal module (100000-109999)
@@ -143,7 +143,7 @@ If similar modules exist, explain why a new module is needed:
### Acknowledgments
- [ ] I have read the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md)
- [ ] I have read the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md)
- [ ] I understand internal modules use range 100000-119999
- [ ] I understand public modules require external registration with Dolibarr Foundation
- [ ] I understand module IDs are never reused once allocated
@@ -37,7 +37,7 @@ If you have ideas about how this could be implemented, share them here:
Add any other context, mockups, or screenshots about the feature request here.
## Relevant Standards
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)?
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
- [ ] Accessibility (WCAG 2.1 AA)
- [ ] Localization (en_US/en_GB)
- [ ] Security best practices
+1 -1
View File
@@ -35,7 +35,7 @@ Use this template only for:
<!-- Describe how this could be addressed -->
## Standards Reference
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)?
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
- [ ] SPDX license identifiers
- [ ] Secret management
- [ ] Dependency security
+5 -5
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Templates
INGROUP: MokoStandards.GitHub
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/github/README.md
VERSION: 04.06.00
BRIEF: GitHub-specific templates including issues, PRs, and CODEOWNERS
@@ -150,10 +150,10 @@ your-repository/
blank_issues_enabled: false
contact_links:
- name: "📚 Documentation"
url: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/docs
url: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/docs
about: "Check the documentation first"
- name: "💬 Discussions"
url: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/discussions
url: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/discussions
about: "Ask questions and discuss ideas"
```
@@ -368,12 +368,12 @@ Require status checks that verify:
- [GitHub Issue Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
- [GitHub PR Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository)
- [GitHub CODEOWNERS Documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)
- [MokoStandards Repository](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
- [MokoStandards Repository](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
## Metadata
* **Document**: templates/github/README.md
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
* **Owner**: Moko Consulting Engineering Team
* **Scope**: GitHub templates and configuration
* **Lifecycle**: Active
@@ -92,7 +92,7 @@ List Dolibarr hooks this module will use:
### ID Range Preference
Based on the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md):
Based on the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md):
**Preferred Range** (will be assigned by coordinator):
- [ ] Internal module (100000-109999)
@@ -143,7 +143,7 @@ If similar modules exist, explain why a new module is needed:
### Acknowledgments
- [ ] I have read the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md)
- [ ] I have read the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md)
- [ ] I understand internal modules use range 100000-119999
- [ ] I understand public modules require external registration with Dolibarr Foundation
- [ ] I understand module IDs are never reused once allocated
@@ -37,7 +37,7 @@ If you have ideas about how this could be implemented, share them here:
Add any other context, mockups, or screenshots about the feature request here.
## Relevant Standards
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)?
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
- [ ] Accessibility (WCAG 2.1 AA)
- [ ] Localization (en_US/en_GB)
- [ ] Security best practices
+1 -1
View File
@@ -35,7 +35,7 @@ Use this template only for:
<!-- Describe how this could be addressed -->
## Standards Reference
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)?
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
- [ ] SPDX license identifiers
- [ ] Secret management
- [ ] Dependency security
+5 -5
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Templates
INGROUP: MokoStandards.GitHub
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/github/README.md
VERSION: 04.06.00
BRIEF: GitHub-specific templates including issues, PRs, and CODEOWNERS
@@ -150,10 +150,10 @@ your-repository/
blank_issues_enabled: false
contact_links:
- name: "📚 Documentation"
url: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/docs
url: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/docs
about: "Check the documentation first"
- name: "💬 Discussions"
url: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/discussions
url: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/discussions
about: "Ask questions and discuss ideas"
```
@@ -368,12 +368,12 @@ Require status checks that verify:
- [GitHub Issue Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
- [GitHub PR Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository)
- [GitHub CODEOWNERS Documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)
- [MokoStandards Repository](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
- [MokoStandards Repository](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
## Metadata
* **Document**: templates/github/README.md
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
* **Owner**: Moko Consulting Engineering Team
* **Scope**: GitHub templates and configuration
* **Lifecycle**: Active
+2 -2
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Templates
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/index.md
VERSION: 04.06.00
BRIEF: Comprehensive catalog of all templates in MokoStandards
@@ -417,7 +417,7 @@ To contribute new templates or improvements:
## Metadata
* **Document**: templates/index.md
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards)
* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)
* **Owner**: Moko Consulting Engineering Team
* **Scope**: Template catalog and usage guide
* **Lifecycle**: Active
+6 -6
View File
@@ -17,7 +17,7 @@ Required templates are essential files that provide core functionality and ensur
**Installation**:
```bash
# Quick install
curl -fsSL https://raw.githubusercontent.com/mokoconsulting-tech/MokoStandards/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh
curl -fsSL https://raw.githubusercontent.com/MokoConsulting/MokoStandards/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh
chmod +x scripts/maintenance/setup-labels.sh
# Or copy from MokoStandards
@@ -100,11 +100,11 @@ Required files should be kept in sync with MokoStandards:
```bash
# Update single file
curl -fsSL https://raw.githubusercontent.com/mokoconsulting-tech/MokoStandards/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh
curl -fsSL https://raw.githubusercontent.com/MokoConsulting/MokoStandards/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh
# Or use bulk sync
cd /path/to/MokoStandards
./scripts/automation/bulk_update_repos.sh --org mokoconsulting-tech --sync-required
./scripts/automation/bulk_update_repos.sh --org MokoConsulting --sync-required
```
## Using with GitHub Copilot
@@ -119,14 +119,14 @@ Required files to deploy:
Process:
1. Create scripts/maintenance/ directory if not exists
2. Download setup-labels.sh from mokoconsulting-tech/MokoStandards
2. Download setup-labels.sh from MokoConsulting/MokoStandards
3. Copy to scripts/maintenance/setup-labels.sh
4. Make executable: chmod +x scripts/maintenance/setup-labels.sh
5. Test with dry-run: ./scripts/maintenance/setup-labels.sh --dry-run
6. Deploy labels: ./scripts/maintenance/setup-labels.sh
7. Verify labels in repository settings
Source: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/tree/main/templates/required
Source: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/tree/main/templates/required
```
## Future Required Files
@@ -142,7 +142,7 @@ As MokoStandards evolves, additional required files may be added:
- **Documentation**: [Copilot Sync Standards Guide](../../docs/guide/copilot-sync-standards.md)
- **Label Guide**: [Label Deployment Guide](../../docs/guides/label-deployment.md)
- **Issues**: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards/issues
- **Issues**: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/issues
- **Contact**: hello@mokoconsulting.tech
## Related Documentation
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Templates.Scripts
INGROUP: MokoStandards.Templates
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
PATH: /templates/scripts/sftp-config/README.md
VERSION: 04.06.00
BRIEF: Setup guide for local SFTP deployment configuration files
+2 -2
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: GitHub.WorkflowTemplates
INGROUP: MokoStandards.Templates
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /templates/workflows/README.md
VERSION: 04.06.00
BRIEF: Documentation for consolidated GitHub workflow templates
@@ -685,7 +685,7 @@ Use of these templates helps ensure:
| ---------- | ------------------------------------------------------------------------------------------------------------ |
| Document | GitHub Workflow Templates README |
| Path | /templates/workflows/README.md |
| Repository | [https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards](https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards) |
| Repository | [https://git.mokoconsulting.tech/MokoConsulting/MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) |
| Owner | Moko Consulting |
| Scope | Workflow template documentation |
| Status | Active |
@@ -22,13 +22,15 @@
# | 4. Update [VERSION: XX.YY.ZZ] badges in markdown files |
# | 5. Write updates.xml (Joomla update server XML) |
# | 6. Create git tag vXX.YY.ZZ |
# | 7a. Patch: update existing GitHub Release for this minor |
# | 7a. Patch: update existing Gitea Release for this minor |
# | 8. Build ZIP, upload asset, write SHA-256 to updates.xml |
# | |
# | Every version change: archives main -> version/XX.YY branch |
# | Patch 00 = development (no release). First release = patch 01. |
# | First release only (patch == 01): |
# | 7b. Create new GitHub Release |
# | 7b. Create new Gitea Release |
# | |
# | GitHub mirror: stable/rc releases only (continue-on-error) |
# | |
# +========================================================================+
@@ -46,6 +48,9 @@ on:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
permissions:
contents: write
@@ -61,15 +66,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup MokoStandards tools
env:
GH_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || github.token }}"}}'
MOKO_CLONE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_MIRROR_TOKEN }}"}}'
run: |
git clone --depth 1 --branch {{standards_branch}} --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \
@@ -99,6 +103,8 @@ jobs:
echo "minor=$MINOR" >> "$GITHUB_OUTPUT"
echo "major=$MAJOR" >> "$GITHUB_OUTPUT"
echo "release_tag=v${MAJOR}" >> "$GITHUB_OUTPUT"
# Determine stability for mirror gating
echo "stability=stable" >> "$GITHUB_OUTPUT"
if [ "$PATCH" = "00" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "is_minor=false" >> "$GITHUB_OUTPUT"
@@ -320,10 +326,10 @@ jobs:
PHP_TAG="<php_minimum>${PHP_MINIMUM}</php_minimum>"
fi
DOWNLOAD_URL="https://github.com/${REPO}/releases/download/v${VERSION}/${EXT_ELEMENT}-${VERSION}.zip"
INFO_URL="https://github.com/${REPO}/releases/tag/v${VERSION}"
DOWNLOAD_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/v${VERSION}/${EXT_ELEMENT}-${VERSION}.zip"
INFO_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/v${VERSION}"
# -- Build stable entry to temp file ─────────────────────────
# -- Build stable entry to temp file
{
printf '%s\n' ' <update>'
printf '%s\n' " <name>${EXT_NAME}</name>"
@@ -347,9 +353,8 @@ jobs:
printf '%s\n' ' </update>'
} > /tmp/stable_entry.xml
# -- Write updates.xml preserving dev/rc entries ──────────────
# -- Write updates.xml preserving dev/rc entries
# Extract existing entries for other stability levels
# Order reflects release workflow: development → alpha → beta → rc → stable
if [ -f "updates.xml" ]; then
printf 'import re, sys\n' > /tmp/extract.py
printf 'with open("updates.xml") as f: c = f.read()\n' >> /tmp/extract.py
@@ -411,69 +416,76 @@ jobs:
fi
echo "Tag: ${TAG}" >> $GITHUB_STEP_SUMMARY
# -- STEP 7: Create or update GitHub Release ------------------------------
- name: "Step 7: GitHub Release"
# -- STEP 7: Create or update Gitea Release --------------------------------
- name: "Step 7: Gitea Release"
if: >-
steps.version.outputs.skip != 'true' &&
steps.check.outputs.tag_exists != 'true'
env:
GH_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
run: |
VERSION="${{ steps.version.outputs.version }}"
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
BRANCH="${{ steps.version.outputs.branch }}"
MAJOR="${{ steps.version.outputs.major }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null)
[ -z "$NOTES" ] && NOTES="Release ${VERSION}"
echo "$NOTES" > /tmp/release_notes.md
# Check if the major release already exists
EXISTING=$(gh release view "$RELEASE_TAG" --json tagName -q .tagName 2>/dev/null || true)
EXISTING=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/tags/${RELEASE_TAG}" 2>/dev/null || true)
EXISTING_ID=$(echo "$EXISTING" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('id',''))" 2>/dev/null || true)
if [ -z "$EXISTING" ]; then
if [ -z "$EXISTING_ID" ]; then
# First release for this major
gh release create "$RELEASE_TAG" \
--title "v${MAJOR} (latest: ${VERSION})" \
--notes-file /tmp/release_notes.md \
--target "$BRANCH"
curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
"${API_BASE}/releases" \
-d "$(python3 -c "import json; print(json.dumps({
'tag_name': '${RELEASE_TAG}',
'name': 'v${MAJOR} (latest: ${VERSION})',
'body': '''${NOTES}''',
'target_commitish': '${BRANCH}'
}))")"
echo "Release created: ${RELEASE_TAG} (${VERSION})" >> $GITHUB_STEP_SUMMARY
else
# Append version notes to existing major release
CURRENT_NOTES=$(gh release view "$RELEASE_TAG" --json body -q .body 2>/dev/null || true)
{
echo "$CURRENT_NOTES"
echo ""
echo "---"
echo "### ${VERSION}"
echo ""
cat /tmp/release_notes.md
} > /tmp/updated_notes.md
CURRENT_BODY=$(echo "$EXISTING" | python3 -c "import sys,json; print(json.load(sys.stdin).get('body',''))" 2>/dev/null || true)
UPDATED_BODY="${CURRENT_BODY}
gh release edit "$RELEASE_TAG" \
--title "v${MAJOR} (latest: ${VERSION})" \
--notes-file /tmp/updated_notes.md
---
### ${VERSION}
${NOTES}"
curl -sf -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
"${API_BASE}/releases/${EXISTING_ID}" \
-d "$(python3 -c "import json,sys; print(json.dumps({
'name': 'v${MAJOR} (latest: ${VERSION})',
'body': sys.stdin.read()
}))" <<< "$UPDATED_BODY")"
echo "Release updated: ${RELEASE_TAG} -> ${VERSION}" >> $GITHUB_STEP_SUMMARY
fi
# -- STEP 8: Build Joomla install ZIP + SHA-256 checksum ------------------
# Every patch builds an install-ready ZIP and uploads it to the minor release.
# Result: one Release per minor version with a ZIP for each patch.
- name: "Step 8: Build Joomla package and update checksum"
if: >-
steps.version.outputs.skip != 'true'
env:
GH_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
run: |
VERSION="${{ steps.version.outputs.version }}"
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
REPO="${{ github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
# All ZIPs upload to the major release tag (vXX)
gh release view "$RELEASE_TAG" --json tagName > /dev/null 2>&1 || {
RELEASE_JSON=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/tags/${RELEASE_TAG}" 2>/dev/null || true)
RELEASE_ID=$(echo "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
if [ -z "$RELEASE_ID" ]; then
echo "No release ${RELEASE_TAG} found — skipping ZIP upload"
exit 0
}
fi
# Find extension element name from manifest
MANIFEST=$(find . -maxdepth 2 -name "*.xml" -exec grep -l '<extension' {} \; 2>/dev/null | head -1 || true)
@@ -507,22 +519,78 @@ jobs:
SHA256_ZIP=$(sha256sum "/tmp/${ZIP_NAME}" | cut -d' ' -f1)
SHA256_TAR=$(sha256sum "/tmp/${TAR_NAME}" | cut -d' ' -f1)
# -- Delete existing assets with same name before uploading ------
ASSETS=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets" 2>/dev/null || echo "[]")
for ASSET_NAME in "$ZIP_NAME" "$TAR_NAME"; do
ASSET_ID=$(echo "$ASSETS" | python3 -c "
import sys,json
assets = json.load(sys.stdin)
for a in assets:
if a['name'] == '${ASSET_NAME}':
print(a['id']); break
" 2>/dev/null || true)
if [ -n "$ASSET_ID" ]; then
curl -sf -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets/${ASSET_ID}" 2>/dev/null || true
fi
done
# -- Upload both to release tag ----------------------------------
gh release upload "$RELEASE_TAG" "/tmp/${ZIP_NAME}" --clobber 2>/dev/null || true
gh release upload "$RELEASE_TAG" "/tmp/${TAR_NAME}" --clobber 2>/dev/null || true
curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${ZIP_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" > /dev/null 2>&1 || true
curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${TAR_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${TAR_NAME}" > /dev/null 2>&1 || true
# -- Update updates.xml with both download formats ---------------
if [ -f "updates.xml" ]; then
ZIP_URL="https://github.com/${REPO}/releases/download/${RELEASE_TAG}/${ZIP_NAME}"
TAR_URL="https://github.com/${REPO}/releases/download/${RELEASE_TAG}/${TAR_NAME}"
ZIP_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${ZIP_NAME}"
TAR_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${TAR_NAME}"
# Replace downloads block with both formats + SHA
sed -i "s|<downloads>.*</downloads>|<downloads>\n <downloadurl type=\"full\" format=\"zip\">${ZIP_URL}</downloadurl>\n <downloadurl type=\"full\" format=\"tar.gz\">${TAR_URL}</downloadurl>\n </downloads>|" updates.xml 2>/dev/null || true
if grep -q '<sha256>' updates.xml; then
sed -i "s|<sha256>.*</sha256>|<sha256>sha256:${SHA256_ZIP}</sha256>|" updates.xml
else
sed -i "s|</downloads>|</downloads>\n <sha256>sha256:${SHA256_ZIP}</sha256>|" updates.xml
fi
# Use Python to update only the stable entry's downloads + sha256
python3 << 'PYEOF'
import re
with open("updates.xml") as f:
content = f.read()
zip_url = "${ZIP_URL}"
tar_url = "${TAR_URL}"
sha = "${SHA256_ZIP}"
# Find the stable update block and replace its downloads + sha256
def replace_stable(m):
block = m.group(0)
# Replace downloads block
new_downloads = (
" <downloads>\n"
f" <downloadurl type=\"full\" format=\"zip\">{zip_url}</downloadurl>\n"
f" <downloadurl type=\"full\" format=\"tar.gz\">{tar_url}</downloadurl>\n"
" </downloads>"
)
block = re.sub(r' <downloads>.*?</downloads>', new_downloads, block, flags=re.DOTALL)
# Add or replace sha256
if '<sha256>' in block:
block = re.sub(r' <sha256>.*?</sha256>', f' <sha256>sha256:{sha}</sha256>', block)
else:
block = block.replace('</downloads>', f'</downloads>\n <sha256>sha256:{sha}</sha256>')
return block
content = re.sub(
r' <update>.*?<tag>stable</tag>.*?</update>',
replace_stable,
content,
flags=re.DOTALL
)
with open("updates.xml", "w") as f:
f.write(content)
PYEOF
git add updates.xml
git commit -m "chore(release): ZIP + tar.gz for ${VERSION} [skip ci]" \
@@ -537,7 +605,47 @@ jobs:
echo "| \`${ZIP_NAME}\` | ${ZIP_SIZE} | \`${SHA256_ZIP}\` |" >> $GITHUB_STEP_SUMMARY
echo "| \`${TAR_NAME}\` | ${TAR_SIZE} | \`${SHA256_TAR}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Release | \`${RELEASE_TAG}\` | |" >> $GITHUB_STEP_SUMMARY
echo "| Download | [${PACKAGE_NAME}](https://github.com/${REPO}/releases/download/${RELEASE_TAG}/${PACKAGE_NAME}) |" >> $GITHUB_STEP_SUMMARY
echo "| Download | [${ZIP_NAME}](${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${ZIP_NAME}) |" >> $GITHUB_STEP_SUMMARY
# -- STEP 9: Mirror to GitHub (stable only) --------------------------------
- name: "Step 9: Mirror release to GitHub"
if: >-
steps.version.outputs.skip != 'true' &&
steps.version.outputs.stability == 'stable' &&
secrets.GH_MIRROR_TOKEN != ''
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GH_MIRROR_TOKEN }}
run: |
VERSION="${{ steps.version.outputs.version }}"
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
MAJOR="${{ steps.version.outputs.major }}"
BRANCH="${{ steps.version.outputs.branch }}"
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null || true)
[ -z "$NOTES" ] && NOTES="Release ${VERSION}"
echo "$NOTES" > /tmp/release_notes.md
EXISTING=$(gh release view "$RELEASE_TAG" --repo "$GH_REPO" --json tagName -q .tagName 2>/dev/null || true)
if [ -z "$EXISTING" ]; then
gh release create "$RELEASE_TAG" \
--repo "$GH_REPO" \
--title "v${MAJOR} (latest: ${VERSION})" \
--notes-file /tmp/release_notes.md \
--target "$BRANCH" || true
else
gh release edit "$RELEASE_TAG" \
--repo "$GH_REPO" \
--title "v${MAJOR} (latest: ${VERSION})" || true
fi
# Upload assets to GitHub mirror
for PKG in /tmp/${EXT_ELEMENT:-pkg}-${VERSION}.*; do
[ -f "$PKG" ] && gh release upload "$RELEASE_TAG" "$PKG" --repo "$GH_REPO" --clobber 2>/dev/null || true
done
echo "GitHub mirror updated: ${GH_REPO} ${RELEASE_TAG}" >> $GITHUB_STEP_SUMMARY
# -- Summary --------------------------------------------------------------
- name: Pipeline Summary
@@ -558,5 +666,5 @@ jobs:
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Release | [View](https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY
echo "| Release | [View](${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY
fi
@@ -46,6 +46,9 @@ on:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
permissions:
contents: write
@@ -61,15 +64,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup MokoStandards tools
env:
GH_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || github.token }}"}}'
MOKO_CLONE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_MIRROR_TOKEN }}"}}'
run: |
git clone --depth 1 --branch {{standards_branch}} --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \
@@ -79,9 +81,11 @@ jobs:
fi
- name: Generate updates.xml entry
id: update
run: |
BRANCH="${{ github.ref_name }}"
REPO="${{ github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "0.0.0")
# Auto-bump patch on alpha/beta/rc branches (not dev — dev bumps manually)
@@ -113,6 +117,8 @@ jobs:
STABILITY="stable"
fi
echo "stability=${STABILITY}" >> "$GITHUB_OUTPUT"
# Parse manifest (portable — no grep -P)
MANIFEST=$(find . -maxdepth 2 -name "*.xml" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
if [ -z "$MANIFEST" ]; then
@@ -175,10 +181,10 @@ jobs:
esac
PACKAGE_NAME="${EXT_ELEMENT}-${DISPLAY_VERSION}.zip"
DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${RELEASE_TAG}/${PACKAGE_NAME}"
INFO_URL="https://github.com/${REPO}"
DOWNLOAD_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${PACKAGE_NAME}"
INFO_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}"
# ── Build install packages (ZIP + tar.gz) ───────────────────
# -- Build install packages (ZIP + tar.gz) --------------------
SOURCE_DIR="src"
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
if [ -d "$SOURCE_DIR" ]; then
@@ -194,20 +200,62 @@ jobs:
SHA256=$(sha256sum "/tmp/${PACKAGE_NAME}" | cut -d' ' -f1)
# Ensure release exists
gh release view "$RELEASE_TAG" --json tagName > /dev/null 2>&1 || \
gh release create "$RELEASE_TAG" --title "${RELEASE_TAG} (${DISPLAY_VERSION})" --notes "${STABILITY} release" --prerelease --target main 2>/dev/null || true
# Ensure release exists on Gitea
RELEASE_JSON=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/tags/${RELEASE_TAG}" 2>/dev/null || true)
RELEASE_ID=$(echo "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
# Upload both formats
gh release upload "$RELEASE_TAG" "/tmp/${PACKAGE_NAME}" --clobber 2>/dev/null || true
gh release upload "$RELEASE_TAG" "/tmp/${TAR_NAME}" --clobber 2>/dev/null || true
if [ -z "$RELEASE_ID" ]; then
# Create release
RELEASE_JSON=$(curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
"${API_BASE}/releases" \
-d "$(python3 -c "import json; print(json.dumps({
'tag_name': '${RELEASE_TAG}',
'name': '${RELEASE_TAG} (${DISPLAY_VERSION})',
'body': '${STABILITY} release',
'prerelease': True,
'target_commitish': 'main'
}))")" 2>/dev/null || true)
RELEASE_ID=$(echo "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
fi
if [ -n "$RELEASE_ID" ]; then
# Delete existing assets with same name before uploading
ASSETS=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets" 2>/dev/null || echo "[]")
for ASSET_FILE in "$PACKAGE_NAME" "$TAR_NAME"; do
ASSET_ID=$(echo "$ASSETS" | python3 -c "
import sys,json
assets = json.load(sys.stdin)
for a in assets:
if a['name'] == '${ASSET_FILE}':
print(a['id']); break
" 2>/dev/null || true)
if [ -n "$ASSET_ID" ]; then
curl -sf -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets/${ASSET_ID}" 2>/dev/null || true
fi
done
# Upload both formats
curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${PACKAGE_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${PACKAGE_NAME}" > /dev/null 2>&1 || true
curl -sf -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${TAR_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${TAR_NAME}" > /dev/null 2>&1 || true
fi
echo "Packages: ${PACKAGE_NAME} + ${TAR_NAME} (SHA: ${SHA256})" >> $GITHUB_STEP_SUMMARY
else
SHA256=""
fi
# ── Build the new entry ───────────────────────────────────────
# -- Build the new entry -----------------------------------------
NEW_ENTRY=""
NEW_ENTRY="${NEW_ENTRY} <update>\n"
NEW_ENTRY="${NEW_ENTRY} <name>${EXT_NAME}</name>\n"
@@ -222,7 +270,7 @@ jobs:
NEW_ENTRY="${NEW_ENTRY} </tags>\n"
NEW_ENTRY="${NEW_ENTRY} <infourl title=\"${EXT_NAME}\">${INFO_URL}</infourl>\n"
NEW_ENTRY="${NEW_ENTRY} <downloads>\n"
TAR_URL="https://github.com/${REPO}/releases/download/${RELEASE_TAG}/${EXT_ELEMENT}-${DISPLAY_VERSION}.tar.gz"
TAR_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${EXT_ELEMENT}-${DISPLAY_VERSION}.tar.gz"
NEW_ENTRY="${NEW_ENTRY} <downloadurl type=\"full\" format=\"zip\">${DOWNLOAD_URL}</downloadurl>\n"
NEW_ENTRY="${NEW_ENTRY} <downloadurl type=\"full\" format=\"tar.gz\">${TAR_URL}</downloadurl>\n"
NEW_ENTRY="${NEW_ENTRY} </downloads>\n"
@@ -233,10 +281,10 @@ jobs:
NEW_ENTRY="${NEW_ENTRY} <maintainerurl>https://mokoconsulting.tech</maintainerurl>\n"
NEW_ENTRY="${NEW_ENTRY} </update>"
# ── Write new entry to temp file ───────────────────────────────
# -- Write new entry to temp file --------------------------------
printf '%b' "$NEW_ENTRY" > /tmp/new_entry.xml
# ── Merge into updates.xml ─────────────────────────────────────
# -- Merge into updates.xml (only update this stability channel) -
if [ ! -f "updates.xml" ]; then
printf '%s\n' '<?xml version="1.0" encoding="utf-8"?>' > updates.xml
printf '%s\n' '<updates>' >> updates.xml
@@ -244,15 +292,21 @@ jobs:
printf '\n%s\n' '</updates>' >> updates.xml
else
# Remove existing entry for this stability, insert new one
printf 'import re\nstability = "%s"\n' "${STABILITY}" > /tmp/merge_xml.py
printf 'with open("updates.xml") as f: content = f.read()\n' >> /tmp/merge_xml.py
printf 'with open("/tmp/new_entry.xml") as f: new_entry = f.read()\n' >> /tmp/merge_xml.py
printf 'pattern = r" <update>.*?<tag>" + re.escape(stability) + r"</tag>.*?</update>\\n?"\n' >> /tmp/merge_xml.py
printf 'content = re.sub(pattern, "", content, flags=re.DOTALL)\n' >> /tmp/merge_xml.py
printf 'content = content.replace("</updates>", new_entry + "\\n</updates>")\n' >> /tmp/merge_xml.py
printf 'content = re.sub(r"\\n{3,}", "\\n\\n", content)\n' >> /tmp/merge_xml.py
printf 'with open("updates.xml", "w") as f: f.write(content)\n' >> /tmp/merge_xml.py
python3 /tmp/merge_xml.py 2>/dev/null || {
python3 << PYEOF
import re
stability = "${STABILITY}"
with open("updates.xml") as f:
content = f.read()
with open("/tmp/new_entry.xml") as f:
new_entry = f.read()
pattern = r" <update>.*?<tag>" + re.escape(stability) + r"</tag>.*?</update>\n?"
content = re.sub(pattern, "", content, flags=re.DOTALL)
content = content.replace("</updates>", new_entry + "\n</updates>")
content = re.sub(r"\n{3,}", "\n\n", content)
with open("updates.xml", "w") as f:
f.write(content)
PYEOF
if [ $? -ne 0 ]; then
# Fallback: rebuild keeping other stability entries
{
printf '%s\n' '<?xml version="1.0" encoding="utf-8"?>'
@@ -267,7 +321,7 @@ jobs:
printf '\n%s\n' '</updates>'
} > /tmp/updates_new.xml
mv /tmp/updates_new.xml updates.xml
}
fi
fi
# Commit
@@ -280,6 +334,23 @@ jobs:
git push
}
# -- Mirror to GitHub (stable and rc only) --------------------------------
- name: Mirror release to GitHub
if: >-
(steps.update.outputs.stability == 'stable' || steps.update.outputs.stability == 'rc') &&
secrets.GH_MIRROR_TOKEN != ''
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GH_MIRROR_TOKEN }}
run: |
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
STABILITY="${{ steps.update.outputs.stability }}"
echo "GitHub mirror sync for ${STABILITY} — ${GH_REPO}" >> $GITHUB_STEP_SUMMARY
# Mirror packages if they exist
for PKG in /tmp/*.zip /tmp/*.tar.gz; do
[ -f "$PKG" ] && gh release upload "${RELEASE_TAG}" "$PKG" --repo "$GH_REPO" --clobber 2>/dev/null || true
done
- name: SFTP deploy to dev server
if: contains(github.ref, 'dev/')
env:
@@ -290,15 +361,15 @@ jobs:
DEV_PORT: ${{ vars.DEV_FTP_PORT }}
DEV_KEY: ${{ secrets.DEV_FTP_KEY }}
DEV_PASS: ${{ secrets.DEV_FTP_PASSWORD }}
GH_TOKEN: ${{ secrets.GA_TOKEN || secrets.GH_TOKEN || github.token }}
run: |
# ── Permission check: admin or maintain role required ──────
# -- Permission check: admin or maintain role required --------
ACTOR="${{ github.actor }}"
REPO="${{ github.repository }}"
PERMISSION=$(gh api "repos/${REPO}/collaborators/${ACTOR}/permission" \
--jq '.permission' 2>/dev/null || \
gh api "repos/${REPO}/collaborators/${ACTOR}" \
--jq '.role' 2>/dev/null || echo "read")
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
PERMISSION=$(curl -sf -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"${API_BASE}/collaborators/${ACTOR}/permission" 2>/dev/null | \
python3 -c "import sys,json; print(json.load(sys.stdin).get('permission','read'))" 2>/dev/null || echo "read")
case "$PERMISSION" in
admin|maintain|write) ;;
*)
+2 -2
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: MokoStandards.Documentation
INGROUP: MokoStandards.Terraform
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /templates/workflows/infrastructure/terraform/index.md
VERSION: 04.06.00
BRIEF: Documentation index for Terraform workflow templates
@@ -276,7 +276,7 @@ Modify the `terraform init` step:
| Applies To | All Repositories |
| Jurisdiction | Tennessee, USA |
| Owner | Moko Consulting |
| Repo | https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards |
| Repo | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards |
| Path | /templates/workflows/infrastructure/terraform/index.md |
| Version | 01.00.00 |
| Status | Active |
+1 -1
View File
@@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: MokoStandards.Wrappers
INGROUP: MokoStandards
REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
PATH: /wrappers/index.md
VERSION: 04.06.00
BRIEF: PHP wrapper scripts — one per CLI script in api/; add logging and repo-root detection