Public Access
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bda63c38a | |||
| 1e9536dd58 | |||
| 52e960de33 | |||
| 46fc2e7235 | |||
| 6c402fcc33 | |||
| 4a94f0d24a | |||
| c5601632fc | |||
| 3330646e33 | |||
| 33e0dbb598 | |||
| cf52b79244 | |||
| c38622d4c3 | |||
| b0c126e990 | |||
| 44457302df | |||
| ccb30937b7 | |||
| 36b88872b1 | |||
| d19078c603 | |||
| b2349f9977 | |||
| 688b9daacd | |||
| d99a8489ca | |||
| 641505caeb | |||
| 91a662ed6d | |||
| 2222877895 | |||
| 55f3cdcbdd | |||
| eaca46e7cf | |||
| ee49474f35 | |||
| a48be3ff87 | |||
| 51f8fcb480 | |||
| dfb3ca876b | |||
| e2e9f6d33b | |||
| 9f0546c1a8 | |||
| 3167233b7c | |||
| 94e6084e0f | |||
| 55a82d7d21 | |||
| 88acf57278 | |||
| ac293fd038 | |||
| 20c036f913 | |||
| 062b33b395 | |||
| 2d8bb5e967 | |||
| a172b21b9b | |||
| 2ce8caad88 | |||
| 0b97aa06c9 | |||
| f2fb64ec5a | |||
| eabc96b506 | |||
| ed54dd5153 | |||
| 40ebb4774c | |||
| bb2c34abbb | |||
| 5680b32e31 | |||
| 88fa860080 | |||
| 0d9c64cd28 | |||
| 3dbd221c69 | |||
| 2cedc0b94e | |||
| 94fde481d2 | |||
| b5c38d76e8 | |||
| ce0502e788 | |||
| cf29777daa | |||
| 61d52ce1cb | |||
| 16305623cc | |||
| e5768d5e44 | |||
| 9342bdf373 | |||
| dad002cc08 | |||
| 37fdef1323 | |||
| 845a377045 | |||
| 1a83a2abd5 | |||
| 9577ea6058 | |||
| c113f0437e | |||
| bfaab8a79e | |||
| 84e54c7567 | |||
| f270ce6a78 | |||
| 7b45f7d92b | |||
| 9859a06a09 | |||
| 926142afa9 |
@@ -38,7 +38,7 @@ composer check # Run all checks
|
|||||||
| `lib/Enterprise/Plugins/` | 11 platform plugins (Joomla, Dolibarr, Node.js, Python, etc.) |
|
| `lib/Enterprise/Plugins/` | 11 platform plugins (Joomla, Dolibarr, Node.js, Python, etc.) |
|
||||||
| `deploy/` | SFTP deployment scripts (Joomla, Dolibarr, health checks) |
|
| `deploy/` | SFTP deployment scripts (Joomla, Dolibarr, health checks) |
|
||||||
| `templates/` | Universal templates, configs, governance schema |
|
| `templates/` | Universal templates, configs, governance schema |
|
||||||
| `.mokogitea/workflows/` | CI/CD workflows (Gitea Actions) |
|
| `.mokogitea/workflows/` | CI/CD workflows (MokoGitea Actions) |
|
||||||
| `bin/moko` | Unified CLI dispatcher — `php bin/moko <command>` |
|
| `bin/moko` | Unified CLI dispatcher — `php bin/moko <command>` |
|
||||||
| `monitoring/sites.json` | Sites list for mcp_mokomonitor |
|
| `monitoring/sites.json` | Sites list for mcp_mokomonitor |
|
||||||
|
|
||||||
@@ -71,6 +71,6 @@ PHPStan runs with `--memory-limit=512M`. CI enforces PHPCS errors; PHPStan is `c
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **New CLI tools**: extend `CliFramework`, not `CLIApp` (legacy)
|
- **New CLI tools**: extend `CliFramework`, not `CLIApp` (legacy)
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: MokoCLI.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/auto-bump.yml
|
# PATH: /.mokogitea/workflows/auto-bump.yml
|
||||||
# VERSION: 09.02.00
|
# VERSION: 09.02.00
|
||||||
# BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
|
# BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
|
||||||
@@ -34,7 +34,8 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
!contains(github.event.head_commit.message, '[skip ci]') &&
|
!contains(github.event.head_commit.message, '[skip ci]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip bump]') &&
|
!contains(github.event.head_commit.message, '[skip bump]') &&
|
||||||
!startsWith(github.event.head_commit.message, 'Merge pull request')
|
!startsWith(github.event.head_commit.message, 'Merge pull request') &&
|
||||||
|
!startsWith(github.event.repository.name, 'Template-')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -43,7 +44,7 @@ jobs:
|
|||||||
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Setup mokocli tools
|
- name: Setup MokoCLI tools
|
||||||
run: |
|
run: |
|
||||||
if ! command -v composer &> /dev/null; then
|
if ! command -v composer &> /dev/null; then
|
||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: MokoCLI.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/auto-release.yml.template
|
# PATH: /.mokogitea/workflows/auto-release.yml
|
||||||
# VERSION: 05.01.00
|
# VERSION: 05.01.00
|
||||||
# BRIEF: Universal build & release � detects platform from manifest.xml
|
# BRIEF: Universal build & release � detects platform from metadata API
|
||||||
#
|
#
|
||||||
# +=======================================================================+
|
# +=======================================================================+
|
||||||
# | UNIVERSAL BUILD & RELEASE PIPELINE |
|
# | UNIVERSAL BUILD & RELEASE PIPELINE |
|
||||||
# +=======================================================================+
|
# +=======================================================================+
|
||||||
# | |
|
# | |
|
||||||
# | Reads manifest.xml (joomla|dolibarr|generic) to branch logic. |
|
# | Reads metadata API (joomla|dolibarr|generic) to branch logic. |
|
||||||
# | |
|
# | |
|
||||||
# | Platform-specific: |
|
# | Platform-specific: |
|
||||||
# | joomla: XML manifest, type-prefixed packages |
|
# | joomla: XML manifest, type-prefixed packages |
|
||||||
@@ -81,7 +81,7 @@ jobs:
|
|||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup mokocli tools
|
- name: Setup MokoCLI tools
|
||||||
env:
|
env:
|
||||||
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
||||||
@@ -95,7 +95,7 @@ jobs:
|
|||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/mokocli
|
rm -rf /tmp/mokocli
|
||||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
||||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||||
cd /tmp/mokocli
|
cd /tmp/mokocli
|
||||||
composer install --no-dev --no-interaction --quiet
|
composer install --no-dev --no-interaction --quiet
|
||||||
@@ -115,20 +115,17 @@ jobs:
|
|||||||
SRC_SHA=$(printf '%s' "$SRC_JSON" | python3 -c "import sys, json; print(json.load(sys.stdin)['commit']['id'])" 2>/dev/null || true)
|
SRC_SHA=$(printf '%s' "$SRC_JSON" | python3 -c "import sys, json; print(json.load(sys.stdin)['commit']['id'])" 2>/dev/null || true)
|
||||||
[ -n "$SRC_SHA" ] || { echo "::error::Could not resolve HEAD of ${FROM}"; exit 1; }
|
[ -n "$SRC_SHA" ] || { echo "::error::Could not resolve HEAD of ${FROM}"; exit 1; }
|
||||||
|
|
||||||
# Point rc at the source commit. If rc already exists (a protected branch that
|
# Point rc at the source commit via git push. Gitea's git/refs PATCH API
|
||||||
# cannot be deleted), force-update its ref in place instead of delete+recreate:
|
# returns HTTP 405 on ANY protected branch (force or not, even for a user in
|
||||||
# deleting a protected branch fails, which then makes the recreate return HTTP 409.
|
# the force-push allowlist), so it cannot move a protected rc. git push honors
|
||||||
if curl -sf -o /dev/null -H "$AUTH" "${API_BASE}/branches/rc"; then
|
# the push + force-push allowlists and creates rc if it is absent.
|
||||||
echo "rc exists - force-updating to ${FROM} (${SRC_SHA})"
|
PUSH_URL="https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@${MOKOGITEA_URL#https://}/${GITEA_ORG}/${GITEA_REPO}.git"
|
||||||
curl -sf -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
|
git config --global user.name "mokogitea-actions[bot]"
|
||||||
"${API_BASE}/git/refs/heads/rc" -d "{\"sha\":\"${SRC_SHA}\",\"force\":true}" \
|
git config --global user.email "actions@mokoconsulting.tech"
|
||||||
|| { echo "::error::Failed to force-update rc (CI token needs force-push on the protected rc branch)"; exit 1; }
|
git fetch --no-tags "$PUSH_URL" "${FROM}"
|
||||||
else
|
git push --force "$PUSH_URL" "FETCH_HEAD:refs/heads/rc" \
|
||||||
echo "Creating rc from ${FROM}"
|
|| { echo "::error::Failed to point rc at ${FROM} (${SRC_SHA}) via git push"; exit 1; }
|
||||||
curl -sf -X POST -H "$AUTH" -H "Content-Type: application/json" \
|
echo "rc set to ${FROM} (${SRC_SHA})"
|
||||||
"${API_BASE}/branches" -d "{\"new_branch_name\":\"rc\",\"old_branch_name\":\"${FROM}\"}" \
|
|
||||||
|| { echo "::error::Failed to create rc from ${FROM}"; exit 1; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Repoint the PR at rc, then delete the old source branch (non-fatal).
|
# Repoint the PR at rc, then delete the old source branch (non-fatal).
|
||||||
if [ -n "$PR" ]; then
|
if [ -n "$PR" ]; then
|
||||||
@@ -142,8 +139,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git fetch origin rc
|
git fetch origin rc
|
||||||
git checkout rc
|
git checkout rc
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
|
|
||||||
- name: Publish RC release
|
- name: Publish RC release
|
||||||
@@ -214,8 +211,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure git for bot pushes
|
- name: Configure git for bot pushes
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
|
|
||||||
- name: Check for merge conflict markers
|
- name: Check for merge conflict markers
|
||||||
@@ -231,7 +228,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "No conflict markers found"
|
echo "No conflict markers found"
|
||||||
|
|
||||||
- name: Setup mokocli tools
|
- name: Setup MokoCLI tools
|
||||||
env:
|
env:
|
||||||
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
||||||
@@ -246,7 +243,7 @@ jobs:
|
|||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/mokocli
|
rm -rf /tmp/mokocli
|
||||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
||||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||||
cd /tmp/mokocli
|
cd /tmp/mokocli
|
||||||
composer install --no-dev --no-interaction --quiet
|
composer install --no-dev --no-interaction --quiet
|
||||||
@@ -377,13 +374,47 @@ jobs:
|
|||||||
if [ -n "$VERSION" ] && [ -f "CHANGELOG.md" ]; then
|
if [ -n "$VERSION" ] && [ -f "CHANGELOG.md" ]; then
|
||||||
DATE=$(date +%Y-%m-%d)
|
DATE=$(date +%Y-%m-%d)
|
||||||
python3 -c "
|
python3 -c "
|
||||||
import sys
|
import sys, re
|
||||||
version, date = sys.argv[1], sys.argv[2]
|
version, date = sys.argv[1], sys.argv[2]
|
||||||
content = open('CHANGELOG.md').read()
|
lines = open('CHANGELOG.md').read().split('\n')
|
||||||
old = '## [Unreleased]'
|
h2 = re.compile(r'^##\s+\[([^\]]+)\]')
|
||||||
new = f'## [Unreleased]\n\n## [{version}] --- {date}'
|
header, sections, cur = [], [], None
|
||||||
content = content.replace(old, new, 1)
|
for ln in lines:
|
||||||
open('CHANGELOG.md', 'w').write(content)
|
m = h2.match(ln)
|
||||||
|
if m:
|
||||||
|
if cur: sections.append(cur)
|
||||||
|
cur = {'label': m.group(1).strip(), 'head': ln, 'body': []}
|
||||||
|
elif cur is None:
|
||||||
|
header.append(ln)
|
||||||
|
else:
|
||||||
|
cur['body'].append(ln)
|
||||||
|
if cur: sections.append(cur)
|
||||||
|
def nonempty(b): return any(x.strip() for x in b)
|
||||||
|
def trim(b):
|
||||||
|
b = b[:]
|
||||||
|
while b and not b[0].strip(): b.pop(0)
|
||||||
|
while b and not b[-1].strip(): b.pop()
|
||||||
|
return b
|
||||||
|
unreleased, order, bykey = [], [], {}
|
||||||
|
for s in sections:
|
||||||
|
key = s['label'].lower()
|
||||||
|
if key == 'unreleased':
|
||||||
|
if nonempty(s['body']): unreleased += s['body']
|
||||||
|
continue
|
||||||
|
if not nonempty(s['body']): continue # drop blank release sections
|
||||||
|
if key in bykey: bykey[key]['body'] += [''] + s['body'] # merge duplicate heading (never drop content)
|
||||||
|
else: bykey[key] = s; order.append(key)
|
||||||
|
rest, seen = [bykey[k] for k in order], set(order)
|
||||||
|
out = []
|
||||||
|
htxt = '\n'.join(header).rstrip()
|
||||||
|
if htxt: out += [htxt, '']
|
||||||
|
out += ['## [Unreleased]', '']
|
||||||
|
promote = bool(unreleased) and version.lower() not in seen
|
||||||
|
if unreleased and not promote: out += trim(unreleased) + ['']
|
||||||
|
if promote: out += ['## [%s] --- %s' % (version, date), ''] + trim(unreleased) + ['']
|
||||||
|
for s in rest: out += [s['head'], ''] + trim(s['body']) + ['']
|
||||||
|
res = re.sub(r'\n{3,}', '\n\n', '\n'.join(out)).rstrip('\n') + '\n'
|
||||||
|
open('CHANGELOG.md', 'w').write(res)
|
||||||
" "$VERSION" "$DATE"
|
" "$VERSION" "$DATE"
|
||||||
git add CHANGELOG.md
|
git add CHANGELOG.md
|
||||||
git commit -m "chore: promote changelog [Unreleased] → [${VERSION}]" || true
|
git commit -m "chore: promote changelog [Unreleased] → [${VERSION}]" || true
|
||||||
@@ -426,7 +457,7 @@ jobs:
|
|||||||
&& echo "main branch pushed to GitHub mirror" \
|
&& echo "main branch pushed to GitHub mirror" \
|
||||||
|| echo "WARNING: GitHub mirror push failed"
|
|| echo "WARNING: GitHub mirror push failed"
|
||||||
|
|
||||||
- name: "Step 11: Delete rc branch and recreate dev from main"
|
- name: "Step 11: Delete rc branch (dev reset moved to cascade-dev.yml)"
|
||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
@@ -438,17 +469,9 @@ jobs:
|
|||||||
"${API_BASE}/branches/rc" 2>/dev/null \
|
"${API_BASE}/branches/rc" 2>/dev/null \
|
||||||
&& echo "Deleted rc branch" || echo "rc branch not found"
|
&& echo "Deleted rc branch" || echo "rc branch not found"
|
||||||
|
|
||||||
# Delete dev branch
|
# dev is reset from main by the dedicated "Cascade Main -> Dev" workflow
|
||||||
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \
|
# (cascade-dev.yml), which runs after this release completes.
|
||||||
"${API_BASE}/branches/dev" 2>/dev/null && echo "Deleted dev branch"
|
echo "rc cleaned; dev reset handled by cascade-dev.yml" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
# Recreate dev from main (now includes version bump + changelog promotion)
|
|
||||||
curl -sf -X POST -H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${API_BASE}/branches" \
|
|
||||||
-d '{"new_branch_name":"dev","old_branch_name":"main"}' 2>/dev/null && echo "Recreated dev from main"
|
|
||||||
|
|
||||||
echo "Pre-release branches cleaned, dev reset from main" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
- name: "Step 12: Create version branch from main"
|
- name: "Step 12: Create version branch from main"
|
||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Universal
|
# INGROUP: MokoCLI.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/branch-cleanup.yml
|
# PATH: /.mokogitea/workflows/branch-cleanup.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Delete feature branches after PR merge
|
# BRIEF: Delete feature branches after PR merge
|
||||||
|
|||||||
@@ -1,10 +1,190 @@
|
|||||||
# DISABLED — auto-release Step 11 recreates dev from main after every release.
|
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||||
# Cascade-dev is redundant and causes version conflicts when both main and dev
|
#
|
||||||
# have different version numbers in templateDetails.xml / manifest.xml.
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
name: "Cascade Main → Dev (DISABLED)"
|
#
|
||||||
on: workflow_dispatch
|
# FILE INFORMATION
|
||||||
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
|
# INGROUP: MokoCLI.Cascade
|
||||||
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
|
# PATH: /.mokogitea/workflows/cascade-dev.yml
|
||||||
|
# VERSION: 02.01.00
|
||||||
|
# BRIEF: Cascade main -> dev; auto-merge clean, auto-resolve VERSION-stamp-only conflicts, else notify
|
||||||
|
|
||||||
|
name: "Cascade Main -> Dev"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
# Daily safety net: catches drift even when main only received [skip ci] pushes
|
||||||
|
# (which never fire the push trigger above). Off-round minute to avoid a fleet-wide spike.
|
||||||
|
schedule:
|
||||||
|
- cron: '23 7 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
# ntfy destination is configured via repo or org variables (org vars are inherited).
|
||||||
|
NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }}
|
||||||
|
NTFY_TOPIC: ${{ vars.CASCADE_NTFY_TOPIC || vars.NTFY_TOPIC || 'gitea-releases' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
noop:
|
cascade:
|
||||||
|
name: Cascade main -> dev
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Cascade disabled — auto-release handles dev recreation"
|
- name: Checkout (full history for merge/resolve)
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
|
||||||
|
- name: Cascade main -> dev (auto-resolve version stamps, else notify)
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
API="${MOKOGITEA_URL}/api/v1/repos/${REPO}"
|
||||||
|
AUTH="Authorization: token ${TOKEN}"
|
||||||
|
jqget() { python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('$1',''))" 2>/dev/null; }
|
||||||
|
|
||||||
|
# 0. dev must exist
|
||||||
|
if ! curl -sf -H "$AUTH" "${API}/branches/dev" >/dev/null 2>&1; then
|
||||||
|
echo "No dev branch - nothing to cascade."; exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 1. is main ahead of dev?
|
||||||
|
AHEAD=$(curl -sf -H "$AUTH" "${API}/compare/dev...main" \
|
||||||
|
| python3 -c "import sys,json; print(json.load(sys.stdin).get('total_commits',0))" 2>/dev/null || echo 0)
|
||||||
|
if [ "${AHEAD:-0}" -eq 0 ]; then
|
||||||
|
echo "dev already up to date with main."; exit 0
|
||||||
|
fi
|
||||||
|
echo "main is ${AHEAD} commit(s) ahead of dev."
|
||||||
|
|
||||||
|
# 2. reuse an open main->dev PR, else create one
|
||||||
|
PR=$(curl -sf -H "$AUTH" "${API}/pulls?state=open&base=dev" \
|
||||||
|
| python3 -c "import sys,json; d=json.load(sys.stdin); print(next((str(p['number']) for p in d if p.get('head',{}).get('ref')=='main'), ''))" 2>/dev/null || echo "")
|
||||||
|
if [ -z "$PR" ]; then
|
||||||
|
RESP=$(curl -s -H "$AUTH" -H "Content-Type: application/json" -X POST "${API}/pulls" \
|
||||||
|
-d '{"head":"main","base":"dev","title":"chore(sync): cascade main -> dev","body":"Automated cascade of main into dev. Auto-merges when conflict-free, auto-resolves VERSION-stamp-only conflicts, otherwise left open for manual resolution."}')
|
||||||
|
PR=$(printf '%s' "$RESP" | jqget number)
|
||||||
|
if [ -z "$PR" ]; then
|
||||||
|
echo "::warning::Could not open cascade PR: $RESP"; exit 0
|
||||||
|
fi
|
||||||
|
echo "Opened cascade PR #${PR}"
|
||||||
|
else
|
||||||
|
echo "Reusing open cascade PR #${PR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify() {
|
||||||
|
curl -sS \
|
||||||
|
-H "Title: ${REPO}: dev cascade needs manual merge" \
|
||||||
|
-H "Tags: warning,twisted_rightwards_arrows" \
|
||||||
|
-H "Priority: high" \
|
||||||
|
-H "Click: ${MOKOGITEA_URL}/${REPO}/pulls/${PR}" \
|
||||||
|
-d "main -> dev cascade PR #${PR} $1 It was NOT auto-merged; resolve it manually." \
|
||||||
|
"${NTFY_URL}/${NTFY_TOPIC}" || true
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. wait for MokoGitea to compute mergeability (conflict detection)
|
||||||
|
MERGEABLE=""
|
||||||
|
for _ in 1 2 3 4 5 6; do
|
||||||
|
MERGEABLE=$(curl -sf -H "$AUTH" "${API}/pulls/${PR}" | jqget mergeable)
|
||||||
|
case "$MERGEABLE" in True|False) break ;; esac
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
echo "mergeable=${MERGEABLE}"
|
||||||
|
|
||||||
|
# 4a. conflict-free -> merge via API (existing behaviour)
|
||||||
|
if [ "$MERGEABLE" = "True" ]; then
|
||||||
|
CODE=$(curl -s -o /tmp/merge.json -w "%{http_code}" -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
|
-X POST "${API}/pulls/${PR}/merge" -d '{"Do":"merge","merge_when_checks_succeed":true}')
|
||||||
|
if [ "$CODE" -ge 200 ] && [ "$CODE" -lt 300 ]; then
|
||||||
|
echo "Cascade PR #${PR} merged (or scheduled to merge when checks pass)."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "::warning::Auto-merge returned HTTP ${CODE}: $(cat /tmp/merge.json)"
|
||||||
|
notify "could not be auto-merged (HTTP ${CODE})."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 4b. conflicts -> try to auto-resolve if they are ONLY VERSION-stamp lines.
|
||||||
|
echo "PR not cleanly mergeable; checking whether conflicts are VERSION-stamp-only..."
|
||||||
|
git config user.name "MokoGitea Cascade"
|
||||||
|
git config user.email "actions@mokoconsulting.tech"
|
||||||
|
git fetch --quiet origin main dev
|
||||||
|
git checkout -B dev origin/dev
|
||||||
|
|
||||||
|
if git merge --no-ff --no-commit origin/main >/dev/null 2>&1; then
|
||||||
|
# Became clean at git level (e.g. mergeability was still computing) -> commit + push.
|
||||||
|
git commit -m "chore(sync): cascade main -> dev [skip ci]" >/dev/null
|
||||||
|
git push origin dev
|
||||||
|
echo "Cascade merged cleanly at git level and pushed to dev."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFLICTS=$(git diff --name-only --diff-filter=U)
|
||||||
|
echo "Conflicted files:"; echo "${CONFLICTS}"
|
||||||
|
|
||||||
|
# A conflict is "stamp-only" when every line inside every conflict block matches
|
||||||
|
# a version-stamp pattern (VERSION: header, <version> element, or CHANGELOG title).
|
||||||
|
is_stamp_only() {
|
||||||
|
awk '
|
||||||
|
/^<<<<<<< / { inc=1; next }
|
||||||
|
inc && /^=======$/ { next }
|
||||||
|
/^>>>>>>> / { inc=0; next }
|
||||||
|
inc { if ($0 !~ /(VERSION:|<version>|# Changelog)/) { bad=1 } }
|
||||||
|
END { exit(bad ? 1 : 0) }
|
||||||
|
' "$1"
|
||||||
|
}
|
||||||
|
# Resolve a stamp-only file by keeping dev (ours) for the conflicting lines,
|
||||||
|
# preserving all auto-merged content around them.
|
||||||
|
keep_ours() {
|
||||||
|
awk '
|
||||||
|
/^<<<<<<< / { inc=1; side="ours"; next }
|
||||||
|
inc && /^=======$/ { side="theirs"; next }
|
||||||
|
/^>>>>>>> / { inc=0; next }
|
||||||
|
{ if (!inc) { print; next } if (side=="ours") print }
|
||||||
|
' "$1" > "$1.resolved" && mv "$1.resolved" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
ALL_STAMP=1
|
||||||
|
for f in ${CONFLICTS}; do
|
||||||
|
if ! is_stamp_only "$f"; then
|
||||||
|
echo "::notice::$f has non-stamp conflicts -> manual resolution required."
|
||||||
|
ALL_STAMP=0; break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$ALL_STAMP" != "1" ]; then
|
||||||
|
git merge --abort || true
|
||||||
|
notify "has non-version-stamp conflicts and cannot be auto-resolved."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "All conflicts are VERSION-stamp-only; resolving in favour of dev."
|
||||||
|
for f in ${CONFLICTS}; do
|
||||||
|
keep_ours "$f"
|
||||||
|
git add "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Best-effort: normalise stamps to dev's version if mokocli is available.
|
||||||
|
if [ -f /opt/mokocli/cli/version_check.php ]; then
|
||||||
|
php /opt/mokocli/cli/version_check.php --fix || true
|
||||||
|
git add -A
|
||||||
|
fi
|
||||||
|
|
||||||
|
git commit -m "chore(sync): cascade main -> dev (auto-resolved version stamps) [skip ci]" >/dev/null
|
||||||
|
git push origin dev
|
||||||
|
echo "Cascade auto-resolved and pushed to dev."
|
||||||
|
|
||||||
|
# Close the now-redundant PR (its changes are in dev) with an explanatory comment.
|
||||||
|
curl -s -H "$AUTH" -H "Content-Type: application/json" -X POST "${API}/issues/${PR}/comments" \
|
||||||
|
-d '{"body":"Auto-resolved VERSION-stamp-only conflicts and pushed the merge to dev. Closing."}' >/dev/null || true
|
||||||
|
curl -s -H "$AUTH" -H "Content-Type: application/json" -X PATCH "${API}/pulls/${PR}" \
|
||||||
|
-d '{"state":"closed"}' >/dev/null || true
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.CI
|
# INGROUP: MokoCLI.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/ci-generic.yml
|
# PATH: /.mokogitea/workflows/ci-generic.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
@@ -131,10 +131,11 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
# Independent job (no `needs: lint`): the MokoGitea Actions scheduler does not
|
||||||
# Run only when lint succeeded; always() forces evaluation so a skipped
|
# offer the dependent 2nd job of a needs-chain to runners, so it stalls in
|
||||||
# lint (e.g. template repos) skips this job cleanly instead of hanging.
|
# "waiting" and is reaped by ABANDONED_JOB_TIMEOUT. Guard template repos
|
||||||
if: ${{ always() && needs.lint.result == 'success' }}
|
# directly (same condition lint uses) instead of gating on lint's result.
|
||||||
|
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: MokoCLI.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
|
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Reusable workflow — creates/updates a Gitea issue when a CI gate fails.
|
# BRIEF: Reusable workflow — creates/updates a MokoGitea issue when a CI gate fails.
|
||||||
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
|
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
|
||||||
|
|
||||||
name: "Universal: CI Issue Reporter"
|
name: "Universal: CI Issue Reporter"
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
||||||
git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli
|
git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
|
||||||
cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh
|
cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh
|
||||||
|
|
||||||
- name: Report CI failure
|
- name: Report CI failure
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Maintenance
|
# INGROUP: MokoCLI.Maintenance
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||||
# PATH: /.mokogitea/workflows/cleanup.yml
|
# PATH: /.mokogitea/workflows/cleanup.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Scheduled cleanup — delete merged branches and old workflow runs
|
# BRIEF: Scheduled cleanup — delete merged branches and old workflow runs
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Security
|
# INGROUP: MokoCLI.Security
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||||
# PATH: /templates/workflows/gitleaks.yml.template
|
# PATH: /.mokogitea/workflows/gitleaks.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens
|
# BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Automation
|
# INGROUP: MokoCLI.Automation
|
||||||
# VERSION: 09.43.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Auto-create feature branch when an issue is opened
|
# BRIEF: Auto-create feature branch when an issue is opened
|
||||||
|
|
||||||
name: "Universal: Issue Branch"
|
name: "Universal: Issue Branch"
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Notifications
|
# INGROUP: MokoCLI.Notifications
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||||
# PATH: /.mokogitea/workflows/notify.yml
|
# PATH: /.mokogitea/workflows/notify.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Push notifications via ntfy on release success or workflow failure
|
# BRIEF: Push notifications via ntfy on release success or workflow failure
|
||||||
@@ -46,13 +46,13 @@ jobs:
|
|||||||
WORKFLOW="${{ github.event.workflow_run.name }}"
|
WORKFLOW="${{ github.event.workflow_run.name }}"
|
||||||
URL="${{ github.event.workflow_run.html_url }}"
|
URL="${{ github.event.workflow_run.html_url }}"
|
||||||
|
|
||||||
curl -sS \
|
curl -sS --retry 3 --retry-connrefused --retry-delay 2 --max-time 20 \
|
||||||
-H "Title: ${REPO} released" \
|
-H "Title: ${REPO} released" \
|
||||||
-H "Tags: white_check_mark,package" \
|
-H "Tags: white_check_mark,package" \
|
||||||
-H "Priority: default" \
|
-H "Priority: default" \
|
||||||
-H "Click: ${URL}" \
|
-H "Click: ${URL}" \
|
||||||
-d "${WORKFLOW} completed successfully." \
|
-d "${WORKFLOW} completed successfully." \
|
||||||
"${NTFY_URL}/${NTFY_TOPIC}"
|
"${NTFY_URL}/${NTFY_TOPIC}" || echo "::warning::ntfy notification could not be delivered (non-fatal)"
|
||||||
|
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: github.event.workflow_run.conclusion == 'failure'
|
if: github.event.workflow_run.conclusion == 'failure'
|
||||||
@@ -61,10 +61,10 @@ jobs:
|
|||||||
WORKFLOW="${{ github.event.workflow_run.name }}"
|
WORKFLOW="${{ github.event.workflow_run.name }}"
|
||||||
URL="${{ github.event.workflow_run.html_url }}"
|
URL="${{ github.event.workflow_run.html_url }}"
|
||||||
|
|
||||||
curl -sS \
|
curl -sS --retry 3 --retry-connrefused --retry-delay 2 --max-time 20 \
|
||||||
-H "Title: ${REPO} workflow failed" \
|
-H "Title: ${REPO} workflow failed" \
|
||||||
-H "Tags: x,warning" \
|
-H "Tags: x,warning" \
|
||||||
-H "Priority: high" \
|
-H "Priority: high" \
|
||||||
-H "Click: ${URL}" \
|
-H "Click: ${URL}" \
|
||||||
-d "${WORKFLOW} failed. Check the run for details." \
|
-d "${WORKFLOW} failed. Check the run for details." \
|
||||||
"${NTFY_URL}/${NTFY_TOPIC}"
|
"${NTFY_URL}/${NTFY_TOPIC}" || echo "::warning::ntfy notification could not be delivered (non-fatal)"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.CI
|
# INGROUP: MokoCLI.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/pr-check.yml.template
|
# PATH: /.mokogitea/workflows/pr-check.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: PR gate — branch policy + code validation before merge
|
# BRIEF: PR gate — branch policy + code validation before merge
|
||||||
|
|
||||||
@@ -97,6 +97,80 @@ jobs:
|
|||||||
echo "Branch policy: OK (${HEAD} → ${BASE})"
|
echo "Branch policy: OK (${HEAD} → ${BASE})"
|
||||||
echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
|
echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
# ── Docs Update Gate (main PRs) ─────────────────────────────────────────
|
||||||
|
require-docs:
|
||||||
|
name: Require Docs Update
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Enforce only on PRs merging into main: README.md + CHANGELOG.md must both be updated.
|
||||||
|
if: ${{ github.base_ref == 'main' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Require README.md and CHANGELOG.md in the PR diff
|
||||||
|
run: |
|
||||||
|
BASE="${{ github.event.pull_request.base.sha }}"
|
||||||
|
HEAD="${{ github.event.pull_request.head.sha }}"
|
||||||
|
CHANGED="$(git diff --name-only "$BASE" "$HEAD" 2>/dev/null || true)"
|
||||||
|
if [ -z "$CHANGED" ]; then
|
||||||
|
git fetch -q origin "${{ github.base_ref }}" 2>/dev/null || true
|
||||||
|
CHANGED="$(git diff --name-only "origin/${{ github.base_ref }}...HEAD" 2>/dev/null || true)"
|
||||||
|
fi
|
||||||
|
echo "Changed files in PR:"
|
||||||
|
echo "$CHANGED"
|
||||||
|
MISSING=""
|
||||||
|
echo "$CHANGED" | grep -qxE 'README\.md' || MISSING="README.md"
|
||||||
|
echo "$CHANGED" | grep -qxE 'CHANGELOG\.md' || MISSING="${MISSING:+$MISSING, }CHANGELOG.md"
|
||||||
|
if [ -n "$MISSING" ]; then
|
||||||
|
echo "::error::PRs into main must update: ${MISSING}"
|
||||||
|
{
|
||||||
|
echo "## Docs Update Required"
|
||||||
|
echo ""
|
||||||
|
echo "PRs merging into \`main\` must update both **README.md** and **CHANGELOG.md**."
|
||||||
|
echo ""
|
||||||
|
echo "Not updated in this PR: **${MISSING}**"
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Docs update present (README.md + CHANGELOG.md)"
|
||||||
|
echo "## Docs Update: Passed" >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
|
# ── Wiki Update Reminder (main PRs, non-blocking) ───────────────────────
|
||||||
|
wiki-reminder:
|
||||||
|
name: Wiki Update Reminder
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.base_ref == 'main' }}
|
||||||
|
steps:
|
||||||
|
- name: Remind to update the wiki
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
SERVER: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
PR: ${{ github.event.pull_request.number }}
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
{
|
||||||
|
echo "## Wiki Update Reminder"
|
||||||
|
echo ""
|
||||||
|
echo "Docs are **wiki-first** at MokoConsulting. If this change affects behavior, usage, configuration, or standards, update the repo wiki:"
|
||||||
|
echo ""
|
||||||
|
echo "- ${SERVER}/${REPO}/wiki"
|
||||||
|
echo ""
|
||||||
|
echo "_Non-blocking reminder._"
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
# Post a single PR comment (idempotent via hidden marker); best-effort, never fails.
|
||||||
|
API="${SERVER}/api/v1/repos/${REPO}/issues/${PR}/comments"
|
||||||
|
if [ -n "${TOKEN:-}" ] && [ -n "${PR:-}" ]; then
|
||||||
|
existing="$(curl -sf -H "Authorization: token ${TOKEN}" "$API" 2>/dev/null | grep -c 'wiki-reminder' || true)"
|
||||||
|
if [ "${existing:-0}" -eq 0 ]; then
|
||||||
|
curl -sf -H "Authorization: token ${TOKEN}" -H "Content-Type: application/json" -X POST "$API" \
|
||||||
|
-d '{"body":"<!-- wiki-reminder -->\n\n**Wiki reminder:** docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. _(non-blocking)_"}' >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Wiki reminder emitted (non-blocking)."
|
||||||
|
|
||||||
# ── Secret Scanning ──────────────────────────────────────────────────
|
# ── Secret Scanning ──────────────────────────────────────────────────
|
||||||
gitleaks:
|
gitleaks:
|
||||||
name: Secret Scan
|
name: Secret Scan
|
||||||
@@ -136,7 +210,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check for merge conflict markers
|
- name: Check for merge conflict markers
|
||||||
run: |
|
run: |
|
||||||
CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true)
|
CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --exclude-dir='.git' --exclude-dir='.mokogitea' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true)
|
||||||
if [ -n "$CONFLICTS" ]; then
|
if [ -n "$CONFLICTS" ]; then
|
||||||
echo "::error::Merge conflict markers found in source files"
|
echo "::error::Merge conflict markers found in source files"
|
||||||
echo "## Conflict Markers Found" >> $GITHUB_STEP_SUMMARY
|
echo "## Conflict Markers Found" >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -150,7 +224,7 @@ jobs:
|
|||||||
- name: Detect platform
|
- name: Detect platform
|
||||||
id: platform
|
id: platform
|
||||||
run: |
|
run: |
|
||||||
# Platform comes from the MokoGitea metadata API (public GET); manifest.xml is no longer used.
|
# Platform comes from the MokoGitea metadata API (public GET).
|
||||||
API="${GITHUB_SERVER_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${GITHUB_REPOSITORY}/metadata"
|
API="${GITHUB_SERVER_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${GITHUB_REPOSITORY}/metadata"
|
||||||
PLATFORM="$(curl -sf "$API" 2>/dev/null | python3 -c "import sys, json; print(json.load(sys.stdin).get('platform') or '')" 2>/dev/null || true)"
|
PLATFORM="$(curl -sf "$API" 2>/dev/null | python3 -c "import sys, json; print(json.load(sys.stdin).get('platform') or '')" 2>/dev/null || true)"
|
||||||
[ -z "$PLATFORM" ] && PLATFORM="generic"
|
[ -z "$PLATFORM" ] && PLATFORM="generic"
|
||||||
@@ -184,8 +258,9 @@ jobs:
|
|||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
# Skip vendor, node_modules, and index.html stub files
|
# Skip vendor, node_modules, and index.html stub files
|
||||||
case "$file" in ./vendor/*|./node_modules/*) continue ;; esac
|
case "$file" in ./vendor/*|./node_modules/*) continue ;; esac
|
||||||
# Check first 10 lines for JEXEC or JPATH guard
|
# Scan the whole file for the JEXEC/JPATH guard: it is placed after
|
||||||
if ! head -20 "$file" | grep -qE "defined\s*\(\s*['\"](_JEXEC|JPATH_BASE|\\\\JPATH_PLATFORM)['\"]"; then
|
# the SPDX/file-header docblock, which commonly runs past 20 lines.
|
||||||
|
if ! grep -qE "defined\s*\(\s*['\"](_JEXEC|JPATH_BASE|\\\\JPATH_PLATFORM)['\"]" "$file"; then
|
||||||
echo "::error file=${file}::Missing JEXEC guard: ${file}"
|
echo "::error file=${file}::Missing JEXEC guard: ${file}"
|
||||||
ERRORS=$((ERRORS + 1))
|
ERRORS=$((ERRORS + 1))
|
||||||
fi
|
fi
|
||||||
@@ -276,7 +351,7 @@ jobs:
|
|||||||
joomla)
|
joomla)
|
||||||
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
|
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
|
||||||
if [ -z "$MANIFEST" ]; then
|
if [ -z "$MANIFEST" ]; then
|
||||||
echo "::warning::No Joomla manifest found (WaaS site)"
|
echo "::warning::No Joomla manifest found (MokoSuite site)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Manifest: ${MANIFEST}"
|
echo "Manifest: ${MANIFEST}"
|
||||||
@@ -289,7 +364,7 @@ jobs:
|
|||||||
# Block legacy raw/branch update server URLs on MokoGitea
|
# Block legacy raw/branch update server URLs on MokoGitea
|
||||||
RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true)
|
RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true)
|
||||||
if [ -n "$RAW_URLS" ]; then
|
if [ -n "$RAW_URLS" ]; then
|
||||||
echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the Gitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)"
|
echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the MokoGitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)"
|
||||||
echo "$RAW_URLS"
|
echo "$RAW_URLS"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: MokoCLI.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/pre-release.yml.template
|
# PATH: /.mokogitea/workflows/pre-release.yml
|
||||||
# VERSION: 05.02.00
|
# VERSION: 05.02.01
|
||||||
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
||||||
|
|
||||||
name: "Universal: Pre-Release"
|
name: "Universal: Pre-Release"
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git submodule foreach --quiet 'git checkout main && git pull --quiet origin main' 2>/dev/null || true
|
git submodule foreach --quiet 'git checkout main && git pull --quiet origin main' 2>/dev/null || true
|
||||||
|
|
||||||
- name: Setup mokocli tools
|
- name: Setup MokoCLI tools
|
||||||
env:
|
env:
|
||||||
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
|
||||||
@@ -156,13 +156,19 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Commit version bump
|
# Commit version bump
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
git add -A
|
git add -A
|
||||||
git diff --cached --quiet || {
|
git diff --cached --quiet || {
|
||||||
git commit -m "chore(version): pre-release bump to ${VERSION} [skip ci]"
|
git commit -m "chore(version): pre-release bump to ${VERSION} [skip ci]"
|
||||||
git push origin HEAD 2>&1
|
# Push the bump commit, but do NOT fail the release if the target branch
|
||||||
|
# is protected and the release identity is not on the push allowlist.
|
||||||
|
# The build proceeds from the in-tree bumped version regardless; if the
|
||||||
|
# push is rejected, the next run simply re-bumps from the same base.
|
||||||
|
if ! git push origin HEAD 2>&1; then
|
||||||
|
echo "::warning::Version-bump commit could not be pushed (protected branch?). Building from in-tree version ${VERSION} anyway."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Auto-detect element via manifest_element.php
|
# Auto-detect element via manifest_element.php
|
||||||
@@ -274,4 +280,4 @@ jobs:
|
|||||||
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| Channel | ${STABILITY} |" >> $GITHUB_STEP_SUMMARY
|
echo "| Channel | ${STABILITY} |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| Package | \`${ZIP_NAME}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| Package | \`${ZIP_NAME}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| SHA-256 | \`${SHA256:-n/a}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| SHA-256 | \`${SHA256:-n/a}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: MokoCLI.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/rc-revert.yml
|
# PATH: /.mokogitea/workflows/rc-revert.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
|
# BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
|
||||||
@@ -25,7 +25,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: >-
|
||||||
github.event.pull_request.merged == false &&
|
github.event.pull_request.merged == false &&
|
||||||
startsWith(github.event.pull_request.head.ref, 'rc/')
|
startsWith(github.event.pull_request.head.ref, 'rc/') &&
|
||||||
|
!startsWith(github.event.repository.name, 'Template-')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Rename branch
|
- name: Rename branch
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Validation
|
# INGROUP: MokoCLI.Validation
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/joomla/repo_health.yml.template
|
# PATH: /.mokogitea/workflows/repo-health.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts.
|
# BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
|
|
||||||
# Hardcoded authorized users — always allowed
|
# Hardcoded authorized users — always allowed
|
||||||
case "$ACTOR" in
|
case "$ACTOR" in
|
||||||
jmiller|gitea-actions[bot])
|
jmiller|mokogitea-actions[bot])
|
||||||
ALLOWED=true
|
ALLOWED=true
|
||||||
PERMISSION=admin
|
PERMISSION=admin
|
||||||
METHOD="hardcoded allowlist"
|
METHOD="hardcoded allowlist"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,8 +10,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
sync:
|
sync:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ startsWith(github.event.repository.name, 'Template-') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout mokocli
|
- name: Checkout MokoCLI
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: MokoConsulting/mokocli
|
repository: MokoConsulting/mokocli
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow.Template
|
# DEFGROUP: MokoGitea.Workflow.Template
|
||||||
# INGROUP: MokoStandards.CI
|
# INGROUP: MokoCLI.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
||||||
# PATH: /.mokogitea/workflows/version-set.yml
|
# PATH: /.mokogitea/workflows/version-set.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
@@ -34,6 +34,7 @@ jobs:
|
|||||||
set-version:
|
set-version:
|
||||||
name: Set Version to ${{ inputs.version }}
|
name: Set Version to ${{ inputs.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Validate version format
|
- name: Validate version format
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: MokoCLI.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
|
# PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
|
||||||
# VERSION: 01.01.00
|
# VERSION: 01.01.00
|
||||||
# BRIEF: Trigger workflow sync to live repos when a PR is merged to main
|
# BRIEF: Trigger workflow sync to live repos when a PR is merged to main
|
||||||
@@ -27,9 +27,10 @@ jobs:
|
|||||||
name: Sync workflows to live repos
|
name: Sync workflows to live repos
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
startsWith(github.event.repository.name, 'Template-') &&
|
||||||
|
(github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event.pull_request.merged == true &&
|
(github.event.pull_request.merged == true &&
|
||||||
!contains(github.event.pull_request.title, '[skip sync]'))
|
!contains(github.event.pull_request.title, '[skip sync]')))
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Determine platform from repo name
|
- name: Determine platform from repo name
|
||||||
@@ -47,7 +48,7 @@ jobs:
|
|||||||
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
|
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
|
||||||
echo "Platform: ${PLATFORM:-all}"
|
echo "Platform: ${PLATFORM:-all}"
|
||||||
|
|
||||||
- name: Clone mokocli
|
- name: Clone MokoCLI
|
||||||
env:
|
env:
|
||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ BRIEF: Release changelog
|
|||||||
|
|
||||||
## [09.43.00] --- 2026-07-05
|
## [09.43.00] --- 2026-07-05
|
||||||
|
|
||||||
|
## [09.43.00] --- 2026-07-05
|
||||||
|
|
||||||
## [09.42.00] --- 2026-07-04
|
## [09.42.00] --- 2026-07-04
|
||||||
|
|
||||||
## [09.42.00] --- 2026-07-04
|
## [09.42.00] --- 2026-07-04
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge
|
|||||||
7. **Merging to main** triggers the stable release pipeline:
|
7. **Merging to main** triggers the stable release pipeline:
|
||||||
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
|
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
|
||||||
- Stability suffix stripped (clean version)
|
- Stability suffix stripped (clean version)
|
||||||
- Gitea release created with ZIP/tar.gz packages
|
- MokoGitea release created with ZIP/tar.gz packages
|
||||||
- `updates.xml` updated (Joomla extensions)
|
- `updates.xml` updated (Joomla extensions)
|
||||||
- `dev` branch recreated from `main`
|
- `dev` branch recreated from `main`
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ BRIEF: Project overview and documentation
|
|||||||
|
|
||||||
PHP implementation of mokocli — enterprise standards, automation framework, workflow templates, and bulk sync tooling.
|
PHP implementation of mokocli — enterprise standards, automation framework, workflow templates, and bulk sync tooling.
|
||||||
|
|
||||||
> **Primary platform**: [Gitea — git.mokoconsulting.tech](https://git.mokoconsulting.tech/MokoConsulting/MokoCli-API)
|
> **Primary platform**: [MokoGitea — git.mokoconsulting.tech](https://git.mokoconsulting.tech/MokoConsulting/MokoCli-API)
|
||||||
> **Backup mirror**: [GitHub](https://github.com/MokoConsulting/MokoCli-API) *(read-only mirror)*
|
> **Backup mirror**: [GitHub](https://github.com/MokoConsulting/MokoCli-API) *(read-only mirror)*
|
||||||
|
|
||||||
## What Lives Here
|
## What Lives Here
|
||||||
@@ -25,7 +25,7 @@ PHP implementation of mokocli — enterprise standards, automation framework, wo
|
|||||||
|-----------|---------|
|
|-----------|---------|
|
||||||
| `lib/Enterprise/` | 38 PHP enterprise library classes (platform adapters, sync, validation, plugins) |
|
| `lib/Enterprise/` | 38 PHP enterprise library classes (platform adapters, sync, validation, plugins) |
|
||||||
| `cli/` | CLI scripts (archive, create, release, sync rulesets, version management) |
|
| `cli/` | CLI scripts (archive, create, release, sync rulesets, version management) |
|
||||||
| `automation/` | Bulk sync, push files, repo cleanup, Gitea migration |
|
| `automation/` | Bulk sync, push files, repo cleanup, MokoGitea migration |
|
||||||
| `validate/` | 18 validation scripts (health, structure, secrets, syntax, drift) |
|
| `validate/` | 18 validation scripts (health, structure, secrets, syntax, drift) |
|
||||||
| `templates/` | **Workflow templates** and config templates synced to governed repos |
|
| `templates/` | **Workflow templates** and config templates synced to governed repos |
|
||||||
| `definitions/` | Repository structure definitions (`.tf` format) |
|
| `definitions/` | Repository structure definitions (`.tf` format) |
|
||||||
@@ -42,7 +42,7 @@ composer require mokoconsulting-tech/enterprise
|
|||||||
|
|
||||||
### Composer Registry
|
### Composer Registry
|
||||||
|
|
||||||
This package is served from Gitea package registry. Add this to your `composer.json`:
|
This package is served from MokoGitea package registry. Add this to your `composer.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -73,10 +73,10 @@ vendor/bin/moko inventory -- --path .
|
|||||||
| Variable | Purpose |
|
| Variable | Purpose |
|
||||||
|----------|---------|
|
|----------|---------|
|
||||||
| `GIT_PLATFORM` | `gitea` (default) or `github` |
|
| `GIT_PLATFORM` | `gitea` (default) or `github` |
|
||||||
| `GA_TOKEN` | Gitea API / Gitea Actions token |
|
| `GA_TOKEN` | MokoGitea API / MokoGitea Actions token |
|
||||||
| `GH_TOKEN` | GitHub API token (for mirror sync) |
|
| `GH_TOKEN` | GitHub API token (for mirror sync) |
|
||||||
| `GITEA_URL` | Gitea instance URL (default: `https://git.mokoconsulting.tech`) |
|
| `GITEA_URL` | MokoGitea instance URL (default: `https://git.mokoconsulting.tech`) |
|
||||||
| `GITEA_ORG` | Gitea organization (default: `MokoConsulting`) |
|
| `GITEA_ORG` | MokoGitea organization (default: `MokoConsulting`) |
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class ClientDashboardCli extends CliFramework
|
|||||||
$name = $repo['name'] ?? '';
|
$name = $repo['name'] ?? '';
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!str_starts_with($name, 'client-waas-')
|
!str_starts_with($name, 'client-waas-') && !str_starts_with($name, 'client-mokosuite-')
|
||||||
|| !empty($repo['archived'])
|
|| !empty($repo['archived'])
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
@@ -135,7 +135,7 @@ class ClientDashboardCli extends CliFramework
|
|||||||
|
|
||||||
$clients[] = [
|
$clients[] = [
|
||||||
'repo' => $repo['full_name'] ?? '',
|
'repo' => $repo['full_name'] ?? '',
|
||||||
'name' => str_replace('client-waas-', '', $name),
|
'name' => str_replace(['client-waas-', 'client-mokosuite-'], '', $name),
|
||||||
'description' => $repo['description'] ?? '',
|
'description' => $repo['description'] ?? '',
|
||||||
'updated' => $repo['updated_at'] ?? '',
|
'updated' => $repo['updated_at'] ?? '',
|
||||||
'url' => $repo['html_url'] ?? '',
|
'url' => $repo['html_url'] ?? '',
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class ClientInventoryCli extends CliFramework
|
|||||||
foreach ($repos as $repo) {
|
foreach ($repos as $repo) {
|
||||||
$repoName = $repo['name'] ?? '';
|
$repoName = $repo['name'] ?? '';
|
||||||
|
|
||||||
if (strpos($repoName, 'client-waas') === false) {
|
if (strpos($repoName, 'client-waas') === false && strpos($repoName, 'client-mokosuite') === false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class ClientProvisionCli extends CliFramework
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->repoName = 'client-waas-' . $clientName;
|
$this->repoName = 'client-mokosuite-' . $clientName;
|
||||||
|
|
||||||
$this->log('INFO', "=== Client Provisioning: {$clientName} ===");
|
$this->log('INFO', "=== Client Provisioning: {$clientName} ===");
|
||||||
$this->log('INFO', " Org: {$this->org}");
|
$this->log('INFO', " Org: {$this->org}");
|
||||||
@@ -156,7 +156,7 @@ class ClientProvisionCli extends CliFramework
|
|||||||
$resp = $this->giteaApi(
|
$resp = $this->giteaApi(
|
||||||
'POST',
|
'POST',
|
||||||
'/api/v1/repos/MokoConsulting/'
|
'/api/v1/repos/MokoConsulting/'
|
||||||
. 'Template-Client-WaaS/generate',
|
. 'Template-Client/generate',
|
||||||
$payload
|
$payload
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||||
* PATH: /cli/scaffold_client.php
|
* PATH: /cli/scaffold_client.php
|
||||||
* VERSION: 09.43.00
|
* VERSION: 09.43.00
|
||||||
* BRIEF: Scaffold a new client-waas repo from Template-Client-WaaS with pre-configured settings
|
* BRIEF: Scaffold a new client-waas repo from Template-Client with pre-configured settings
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
@@ -26,7 +26,7 @@ class ScaffoldClientCli extends CliFramework
|
|||||||
{
|
{
|
||||||
protected function configure(): void
|
protected function configure(): void
|
||||||
{
|
{
|
||||||
$this->setDescription('Scaffold a new client-waas repo from Template-Client-WaaS');
|
$this->setDescription('Scaffold a new client-waas repo from Template-Client');
|
||||||
$this->addArgument('--name', 'Client name', '');
|
$this->addArgument('--name', 'Client name', '');
|
||||||
$this->addArgument('--org', 'Gitea organization', '');
|
$this->addArgument('--org', 'Gitea organization', '');
|
||||||
$this->addArgument('--gitea-url', 'Gitea URL', 'https://git.mokoconsulting.tech');
|
$this->addArgument('--gitea-url', 'Gitea URL', 'https://git.mokoconsulting.tech');
|
||||||
@@ -47,7 +47,7 @@ class ScaffoldClientCli extends CliFramework
|
|||||||
$this->log('INFO', "Scaffolding client repo: {$org}/{$repoName}");
|
$this->log('INFO', "Scaffolding client repo: {$org}/{$repoName}");
|
||||||
$this->log('INFO', "Gitea URL: {$giteaUrl}");
|
$this->log('INFO', "Gitea URL: {$giteaUrl}");
|
||||||
if ($this->dryRun) {
|
if ($this->dryRun) {
|
||||||
$this->log('INFO', '[DRY RUN] Would create repo from template MokoConsulting/Template-Client-WaaS');
|
$this->log('INFO', '[DRY RUN] Would create repo from template MokoConsulting/Template-Client');
|
||||||
$this->log('INFO', "[DRY RUN] Repo: {$org}/{$repoName}");
|
$this->log('INFO', "[DRY RUN] Repo: {$org}/{$repoName}");
|
||||||
$this->printPostSetupInstructions($repoName, $giteaUrl, $org);
|
$this->printPostSetupInstructions($repoName, $giteaUrl, $org);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -64,7 +64,7 @@ class ScaffoldClientCli extends CliFramework
|
|||||||
]);
|
]);
|
||||||
$response = $this->apiRequest(
|
$response = $this->apiRequest(
|
||||||
'POST',
|
'POST',
|
||||||
"/api/v1/repos/MokoConsulting/Template-Client-WaaS/generate",
|
"/api/v1/repos/MokoConsulting/Template-Client/generate",
|
||||||
$giteaUrl,
|
$giteaUrl,
|
||||||
$token,
|
$token,
|
||||||
$createPayload
|
$createPayload
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Shared library code
|
|||||||
- GitHub client
|
- GitHub client
|
||||||
|
|
||||||
### [Wiki](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki)
|
### [Wiki](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki)
|
||||||
All documentation lives in the Gitea wiki.
|
All documentation lives in the MokoGitea wiki.
|
||||||
|
|
||||||
### [Tests](tests/)
|
### [Tests](tests/)
|
||||||
Test scripts
|
Test scripts
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ class RepositorySynchronizer
|
|||||||
'mcp' => 'MokoConsulting/Template-Generic',
|
'mcp' => 'MokoConsulting/Template-Generic',
|
||||||
'dolibarr' => 'MokoConsulting/Template-Generic',
|
'dolibarr' => 'MokoConsulting/Template-Generic',
|
||||||
'crm-module' => 'MokoConsulting/Template-Generic',
|
'crm-module' => 'MokoConsulting/Template-Generic',
|
||||||
'client' => 'MokoConsulting/Template-Client-WaaS',
|
'client' => 'MokoConsulting/Template-Client',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -951,7 +951,7 @@ class RepositorySynchronizer
|
|||||||
*/
|
*/
|
||||||
private const TEMPLATE_SYNC_TARGETS = [
|
private const TEMPLATE_SYNC_TARGETS = [
|
||||||
'MokoConsulting/Template-Joomla',
|
'MokoConsulting/Template-Joomla',
|
||||||
'MokoConsulting/Template-Client-WaaS',
|
'MokoConsulting/Template-Client',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# mcp_mokobackup
|
# mcp_mokobackup
|
||||||
|
|
||||||
MCP server for database and file backups across Dolibarr, Joomla/Akeeba, Gitea, and file-based environments.
|
MCP server for database and file backups across Dolibarr, Joomla/Akeeba, MokoGitea, and file-based environments.
|
||||||
|
|
||||||
## Quick Reference
|
## Quick Reference
|
||||||
|
|
||||||
@@ -45,5 +45,5 @@ Default config at `~/.mcp_mokobackup.json`. Client repos override via `BACKUP_MC
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Model Context Protocol server for database dumps, file backups, and Akeeba Backu
|
|||||||
| **Language** | Node.js |
|
| **Language** | Node.js |
|
||||||
| **Tools** | 11 tools (6 SSH-based + 5 Akeeba API) |
|
| **Tools** | 11 tools (6 SSH-based + 5 Akeeba API) |
|
||||||
| **License** | GPL-3.0-or-later |
|
| **License** | GPL-3.0-or-later |
|
||||||
| **Platform** | [Gitea](https://git.mokoconsulting.tech/MokoConsulting/backup-mcp) (primary) |
|
| **Platform** | [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/backup-mcp) (primary) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ src/
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- SQL filter builder (`buildSqlFilter`, `searchFilter`) for safe query construction
|
- SQL filter builder (`buildSqlFilter`, `searchFilter`) for safe query construction
|
||||||
- Full documentation: README, INSTALLATION, ARCHITECTURE, API reference
|
- Full documentation: README, INSTALLATION, ARCHITECTURE, API reference
|
||||||
- MokoCli-compliant project structure
|
- MokoCli-compliant project structure
|
||||||
- 12 Gitea Actions CI/CD workflows
|
- 12 MokoGitea Actions CI/CD workflows
|
||||||
|
|
||||||
## Revision History
|
## Revision History
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ This project adheres to the Contributor Covenant Code of Conduct. By participati
|
|||||||
|
|
||||||
### Reporting Bugs
|
### Reporting Bugs
|
||||||
|
|
||||||
- Use the Gitea issue tracker
|
- Use the MokoGitea issue tracker
|
||||||
- Describe the bug clearly with steps to reproduce
|
- Describe the bug clearly with steps to reproduce
|
||||||
- Include the Dolibarr version you're connecting to
|
- Include the Dolibarr version you're connecting to
|
||||||
- Include relevant logs or error messages
|
- Include relevant logs or error messages
|
||||||
@@ -143,7 +143,7 @@ Every repo maintains 5 standard release channel tags:
|
|||||||
|
|
||||||
### CI/CD
|
### CI/CD
|
||||||
|
|
||||||
- Gitea Actions runs all CI workflows
|
- MokoGitea Actions runs all CI workflows
|
||||||
- Workflows live in `.gitea/workflows/`
|
- Workflows live in `.gitea/workflows/`
|
||||||
|
|
||||||
### Secrets
|
### Secrets
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ MCP server for Dolibarr ERP/CRM REST API operations
|
|||||||
|---|---|
|
|---|---|
|
||||||
| **Language** | TypeScript |
|
| **Language** | TypeScript |
|
||||||
| **License** | GPL-3.0-or-later |
|
| **License** | GPL-3.0-or-later |
|
||||||
| **Platform** | [Gitea](https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp) |
|
| **Platform** | [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp) |
|
||||||
| **Node.js** | >= 20.0.0 |
|
| **Node.js** | >= 20.0.0 |
|
||||||
| **MCP SDK** | @modelcontextprotocol/sdk ^1.12.1 |
|
| **MCP SDK** | @modelcontextprotocol/sdk ^1.12.1 |
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Only the current major version receives security updates.
|
|||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
Report security vulnerabilities via Gitea issue (preferred):
|
Report security vulnerabilities via MokoGitea issue (preferred):
|
||||||
https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp/issues/new?template=security.yaml
|
https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp/issues/new?template=security.yaml
|
||||||
|
|
||||||
Or email: hello@mokoconsulting.tech
|
Or email: hello@mokoconsulting.tech
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ src/
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ Build the current project and deploy to a target server.
|
|||||||
|
|
||||||
| Name | Host | Joomla Path | Dolibarr Path |
|
| Name | Host | Joomla Path | Dolibarr Path |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| WAAS_DEV | waas.dev.mokoconsulting.tech | /home/mokoconsulting_dev/waas.dev.mokoconsulting.tech/ | — |
|
| WAAS_DEV | mokosuite.dev.mokoconsulting.tech | /home/mokoconsulting_dev/mokosuite.dev.mokoconsulting.tech/ | — |
|
||||||
| WAAS_DEMO | waas.demo.mokoconsulting.tech | /home/mokoconsulting_demo/waas.demo.mokoconsulting.tech/ | — |
|
| WAAS_DEMO | mokosuite.demo.mokoconsulting.tech | /home/mokoconsulting_demo/mokosuite.demo.mokoconsulting.tech/ | — |
|
||||||
| WAAS_LIVE | mokoconsulting.tech | /home/mokoconsulting/mokoconsulting.tech/ | — |
|
| WAAS_LIVE | mokoconsulting.tech | /home/mokoconsulting/mokoconsulting.tech/ | — |
|
||||||
| CRM_DEV | waas.dev.mokoconsulting.tech | — | /home/mokoconsulting_dev/crm.dev.mokoconsulting.tech/htdocs/custom/ |
|
| CRM_DEV | mokosuite.dev.mokoconsulting.tech | — | /home/mokoconsulting_dev/crm.dev.mokoconsulting.tech/htdocs/custom/ |
|
||||||
| CRM_LIVE | crm.mokoconsulting.tech | — | /home/mokoconsulting_crm/crm.mokoconsulting.tech/htdocs/custom/ |
|
| CRM_LIVE | crm.mokoconsulting.tech | — | /home/mokoconsulting_crm/crm.mokoconsulting.tech/htdocs/custom/ |
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
@@ -39,7 +39,7 @@ Build the current project and deploy to a target server.
|
|||||||
- Verify build output exists
|
- Verify build output exists
|
||||||
|
|
||||||
4. **Deploy:**
|
4. **Deploy:**
|
||||||
- **Joomla**: Use `mcp_mokowaas` tool to install ZIP via Joomla API, OR use `mcp_mokossh` to SFTP + run CLI installer
|
- **Joomla**: Use `mcp_mokosuite` tool to install ZIP via Joomla API, OR use `mcp_mokossh` to SFTP + run CLI installer
|
||||||
- **Dolibarr**: Use `mcp_mokossh` to rsync/scp module directory to `htdocs/custom/`
|
- **Dolibarr**: Use `mcp_mokossh` to rsync/scp module directory to `htdocs/custom/`
|
||||||
|
|
||||||
5. **Post-deploy:**
|
5. **Post-deploy:**
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Rebuild MCP server(s) by running `npm install` and `npm run build`.
|
|||||||
| mcp_mokogitea_api | A:/MCP/mcp_mokogitea_api | Yes (TypeScript) |
|
| mcp_mokogitea_api | A:/MCP/mcp_mokogitea_api | Yes (TypeScript) |
|
||||||
| mcp_mokomonitor | A:/MCP/mcp_mokomonitor | Yes (TypeScript) |
|
| mcp_mokomonitor | A:/MCP/mcp_mokomonitor | Yes (TypeScript) |
|
||||||
| mcp_mokossh | A:/MCP/mcp_mokossh | No (plain JS) |
|
| mcp_mokossh | A:/MCP/mcp_mokossh | No (plain JS) |
|
||||||
| mcp_mokowaas | A:/MCP/mcp_mokowaas | Yes (TypeScript) |
|
| mcp_mokosuite | A:/MCP/mcp_mokosuite | Yes (TypeScript) |
|
||||||
| mcp_windows | A:/MCP/mcp_windows | Yes (TypeScript) |
|
| mcp_windows | A:/MCP/mcp_windows | Yes (TypeScript) |
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
name: new-client
|
name: new-client
|
||||||
description: Scaffold a new WaaS client — Gitea org, theme repo, MCP config, wiki, SSH key
|
description: Scaffold a new MokoSuite client — MokoGitea org, theme repo, MCP config, wiki, SSH key
|
||||||
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
||||||
---
|
---
|
||||||
|
|
||||||
# New WaaS Client Setup
|
# New MokoSuite Client Setup
|
||||||
|
|
||||||
Scaffold everything needed for a new WaaS client deployment.
|
Scaffold everything needed for a new MokoSuite client deployment.
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
- Current directory: !`pwd`
|
- Current directory: !`pwd`
|
||||||
- Template repo: A:/Templates/Template-Client-WaaS/
|
- Template repo: A:/Templates/Template-Client-MokoSuite/
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
@@ -22,19 +22,19 @@ Ask the user for:
|
|||||||
|
|
||||||
Then execute these steps:
|
Then execute these steps:
|
||||||
|
|
||||||
### 1. Create Gitea Organization
|
### 1. Create MokoGitea Organization
|
||||||
- Use `mcp_mokogitea_api` tool `gitea_org_create`
|
- Use `mcp_mokogitea_api` tool `gitea_org_create`
|
||||||
- Org name: PascalCase of slug (e.g. "AcmeCorp")
|
- Org name: PascalCase of slug (e.g. "AcmeCorp")
|
||||||
- Description: "WaaS client: {Client name}"
|
- Description: "MokoSuite client: {Client name}"
|
||||||
|
|
||||||
### 2. Create Client Repository
|
### 2. Create Client Repository
|
||||||
- Use `mcp_mokogitea_api` tool `gitea_repo_create` in the new org
|
- Use `mcp_mokogitea_api` tool `gitea_repo_create` in the new org
|
||||||
- Repo name: `client-waas-{slug}`
|
- Repo name: `client-mokosuite-{slug}`
|
||||||
- Initialize from Template-Client-WaaS if possible, otherwise create empty and copy files
|
- Initialize from Template-Client-MokoSuite if possible, otherwise create empty and copy files
|
||||||
|
|
||||||
### 3. Clone and Scaffold Locally
|
### 3. Clone and Scaffold Locally
|
||||||
- Clone to `A:/client-{slug}/`
|
- Clone to `A:/client-{slug}/`
|
||||||
- Copy template files from `A:/Templates/Template-Client-WaaS/`
|
- Copy template files from `A:/Templates/Template-Client-MokoSuite/`
|
||||||
- Update `src/*.xml` manifest:
|
- Update `src/*.xml` manifest:
|
||||||
- `<name>MokoOnyx Theme — {Client Name}</name>`
|
- `<name>MokoOnyx Theme — {Client Name}</name>`
|
||||||
- `<element>file_mokoonyx_{slug}</element>`
|
- `<element>file_mokoonyx_{slug}</element>`
|
||||||
@@ -44,7 +44,7 @@ Then execute these steps:
|
|||||||
|
|
||||||
### 4. Create SSH Key
|
### 4. Create SSH Key
|
||||||
- Generate key pair at `C:/Users/jmill/OneDrive/Documents/Keys/repos/client-{slug}`
|
- Generate key pair at `C:/Users/jmill/OneDrive/Documents/Keys/repos/client-{slug}`
|
||||||
- Add public key as deploy key on the Gitea repo
|
- Add public key as deploy key on the MokoGitea repo
|
||||||
|
|
||||||
### 5. Setup GitHub Mirror
|
### 5. Setup GitHub Mirror
|
||||||
- Use `gitea_repo_mirror_setup_github_backup_full` to create GitHub backup mirror
|
- Use `gitea_repo_mirror_setup_github_backup_full` to create GitHub backup mirror
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: release
|
name: release
|
||||||
description: Create a release — build ZIP, tag, update updates.xml, create Gitea release
|
description: Create a release — build ZIP, tag, update updates.xml, create MokoGitea release
|
||||||
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@ Create a release for the current repository.
|
|||||||
- Create annotated tag: `git tag -a vX.Y.Z -m "Release X.Y.Z"`
|
- Create annotated tag: `git tag -a vX.Y.Z -m "Release X.Y.Z"`
|
||||||
- Push commits and tags: `git push origin && git push origin --tags`
|
- Push commits and tags: `git push origin && git push origin --tags`
|
||||||
|
|
||||||
6. **Create Gitea release:**
|
6. **Create MokoGitea release:**
|
||||||
- Use `mcp_mokogitea_api` tool `gitea_release_create` with the tag
|
- Use `mcp_mokogitea_api` tool `gitea_release_create` with the tag
|
||||||
- Upload the built ZIP as a release asset via `gitea_release_upload_asset`
|
- Upload the built ZIP as a release asset via `gitea_release_upload_asset`
|
||||||
|
|
||||||
7. **Joomla-specific: update updates.xml:**
|
7. **Joomla-specific: update updates.xml:**
|
||||||
- Prepend new `<update>` block with version, download URL pointing to Gitea release asset
|
- Prepend new `<update>` block with version, download URL pointing to MokoGitea release asset
|
||||||
- ZIP filename follows Joomla convention from feedback_joomla_release_naming memory
|
- ZIP filename follows Joomla convention from feedback_joomla_release_naming memory
|
||||||
- Commit and push the updates.xml change
|
- Commit and push the updates.xml change
|
||||||
|
|
||||||
|
|||||||
@@ -17,23 +17,23 @@ Run health checks across all infrastructure servers using SSH.
|
|||||||
Use `mcp_mokossh` MCP tools to run health checks on each server:
|
Use `mcp_mokossh` MCP tools to run health checks on each server:
|
||||||
|
|
||||||
### 1. GIT Server (git.mokoconsulting.tech)
|
### 1. GIT Server (git.mokoconsulting.tech)
|
||||||
- `systemctl status gitea` — is Gitea running?
|
- `systemctl status gitea` — is MokoGitea running?
|
||||||
- `systemctl status act_runner` — is the Actions runner running?
|
- `systemctl status act_runner` — is the Actions runner running?
|
||||||
- `df -h /` — disk space
|
- `df -h /` — disk space
|
||||||
- `du -sh /var/lib/gitea/repositories/ /var/lib/gitea/data/ /var/lib/gitea/log/` — Gitea storage breakdown
|
- `du -sh /var/lib/gitea/repositories/ /var/lib/gitea/data/ /var/lib/gitea/log/` — MokoGitea storage breakdown
|
||||||
- `uptime` — load average
|
- `uptime` — load average
|
||||||
- `free -h` — memory usage
|
- `free -h` — memory usage
|
||||||
- `certbot certificates 2>/dev/null | grep -E "Expiry|Domains"` — SSL cert expiry
|
- `certbot certificates 2>/dev/null | grep -E "Expiry|Domains"` — SSL cert expiry
|
||||||
- `fail2ban-client status sshd 2>/dev/null | grep "Total banned"` — banned IPs
|
- `fail2ban-client status sshd 2>/dev/null | grep "Total banned"` — banned IPs
|
||||||
|
|
||||||
### 2. WAAS_DEV (waas.dev.mokoconsulting.tech)
|
### 2. WAAS_DEV (mokosuite.dev.mokoconsulting.tech)
|
||||||
- `df -h /` — disk space
|
- `df -h /` — disk space
|
||||||
- `uptime` — load average
|
- `uptime` — load average
|
||||||
- `free -h` — memory
|
- `free -h` — memory
|
||||||
- `php -v | head -1` — PHP version
|
- `php -v | head -1` — PHP version
|
||||||
- Check Joomla health endpoint if available
|
- Check Joomla health endpoint if available
|
||||||
|
|
||||||
### 3. WAAS_DEMO (waas.demo.mokoconsulting.tech)
|
### 3. WAAS_DEMO (mokosuite.demo.mokoconsulting.tech)
|
||||||
- Same checks as WAAS_DEV
|
- Same checks as WAAS_DEV
|
||||||
|
|
||||||
### 4. WAAS_LIVE (mokoconsulting.tech)
|
### 4. WAAS_LIVE (mokoconsulting.tech)
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
---
|
---
|
||||||
name: mokogitea
|
name: mokogitea
|
||||||
description: "MokoGitea server infrastructure, SSH commands, deployment, backup, and administration. Use when the user mentions: gitea, mokogitea, git server, deploy, deployment, restart gitea, ssh into, server status, backup gitea, restore, mirror, github backup, update server, gitea actions, CI/CD, runner, waas server, crm server, server health, disk space, systemctl, nginx, certbot, fail2ban, firewall, server logs, gitea logs, or any remote server operation."
|
description: "MokoGitea server infrastructure, SSH commands, deployment, backup, and administration. Use when the user mentions: gitea, mokogitea, git server, deploy, deployment, restart gitea, ssh into, server status, backup gitea, restore, mirror, github backup, update server, gitea actions, CI/CD, runner, mokosuite server, crm server, server health, disk space, systemctl, nginx, certbot, fail2ban, firewall, server logs, gitea logs, or any remote server operation."
|
||||||
when_to_use: "Auto-trigger when discussing: server management, SSH operations, Gitea administration, deployments, backups, mirrors, CI runners, or any infrastructure task involving git.mokoconsulting.tech or the MokoGitea instance."
|
when_to_use: "Auto-trigger when discussing: server management, SSH operations, MokoGitea administration, deployments, backups, mirrors, CI runners, or any infrastructure task involving git.mokoconsulting.tech or the MokoGitea instance."
|
||||||
---
|
---
|
||||||
|
|
||||||
# MokoGitea Infrastructure Reference
|
# MokoGitea Infrastructure Reference
|
||||||
|
|
||||||
You are helping with MokoGitea server infrastructure. Use the `mcp_mokossh` MCP tools for SSH commands and `mcp_mokogitea_api` tools for Gitea API operations.
|
You are helping with MokoGitea server infrastructure. Use the `mcp_mokossh` MCP tools for SSH commands and `mcp_mokogitea_api` tools for MokoGitea API operations.
|
||||||
|
|
||||||
## Server Map
|
## Server Map
|
||||||
|
|
||||||
| Name | Host | User | Port | Purpose |
|
| Name | Host | User | Port | Purpose |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| GIT | git.mokoconsulting.tech | mokoconsulting | 2918 | MokoGitea instance (Gitea fork) |
|
| GIT | git.mokoconsulting.tech | mokoconsulting | 2918 | MokoGitea instance (MokoGitea fork) |
|
||||||
| WAAS_DEV | waas.dev.mokoconsulting.tech | mokoconsulting_dev | 22 | WaaS dev (Joomla + Dolibarr) |
|
| WAAS_DEV | mokosuite.dev.mokoconsulting.tech | mokoconsulting_dev | 22 | MokoSuite dev (Joomla + Dolibarr) |
|
||||||
| WAAS_DEMO | waas.demo.mokoconsulting.tech | mokoconsulting_demo | 22 | WaaS demo |
|
| WAAS_DEMO | mokosuite.demo.mokoconsulting.tech | mokoconsulting_demo | 22 | MokoSuite demo |
|
||||||
| WAAS_LIVE | mokoconsulting.tech | mokoconsulting | 22 | WaaS production |
|
| WAAS_LIVE | mokoconsulting.tech | mokoconsulting | 22 | MokoSuite production |
|
||||||
| CRM_DEV | waas.dev.mokoconsulting.tech | mokoconsulting_dev | 22 | CRM dev (shared host with WAAS_DEV) |
|
| CRM_DEV | mokosuite.dev.mokoconsulting.tech | mokoconsulting_dev | 22 | CRM dev (shared host with WAAS_DEV) |
|
||||||
| CRM_LIVE | crm.mokoconsulting.tech | mokoconsulting_crm | 22 | CRM production |
|
| CRM_LIVE | crm.mokoconsulting.tech | mokoconsulting_crm | 22 | CRM production |
|
||||||
|
|
||||||
SSH key: `jmiller_private.openssh` (all MCP connections)
|
SSH key: `jmiller_private.openssh` (all MCP connections)
|
||||||
|
|
||||||
## Common SSH Commands
|
## Common SSH Commands
|
||||||
|
|
||||||
### Gitea Server (GIT)
|
### MokoGitea Server (GIT)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Service management
|
# Service management
|
||||||
@@ -35,12 +35,12 @@ sudo systemctl stop gitea
|
|||||||
sudo journalctl -u gitea -f # Follow live logs
|
sudo journalctl -u gitea -f # Follow live logs
|
||||||
sudo journalctl -u gitea --since "1 hour ago" # Recent logs
|
sudo journalctl -u gitea --since "1 hour ago" # Recent logs
|
||||||
|
|
||||||
# Gitea CLI (run as git user)
|
# MokoGitea CLI (run as git user)
|
||||||
sudo -u git /usr/local/bin/gitea admin user list
|
sudo -u git /usr/local/bin/gitea admin user list
|
||||||
sudo -u git /usr/local/bin/gitea admin auth list
|
sudo -u git /usr/local/bin/gitea admin auth list
|
||||||
sudo -u git /usr/local/bin/gitea doctor check
|
sudo -u git /usr/local/bin/gitea doctor check
|
||||||
|
|
||||||
# Gitea Actions runner
|
# MokoGitea Actions runner
|
||||||
sudo systemctl status act_runner
|
sudo systemctl status act_runner
|
||||||
sudo systemctl restart act_runner
|
sudo systemctl restart act_runner
|
||||||
sudo journalctl -u act_runner -f
|
sudo journalctl -u act_runner -f
|
||||||
@@ -73,12 +73,12 @@ sudo fail2ban-client status
|
|||||||
sudo fail2ban-client status sshd
|
sudo fail2ban-client status sshd
|
||||||
```
|
```
|
||||||
|
|
||||||
### WaaS Servers (WAAS_DEV / WAAS_DEMO / WAAS_LIVE)
|
### MokoSuite Servers (WAAS_DEV / WAAS_DEMO / WAAS_LIVE)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Joomla paths
|
# Joomla paths
|
||||||
# Dev: /home/mokoconsulting_dev/waas.dev.mokoconsulting.tech/
|
# Dev: /home/mokoconsulting_dev/mokosuite.dev.mokoconsulting.tech/
|
||||||
# Demo: /home/mokoconsulting_demo/waas.demo.mokoconsulting.tech/
|
# Demo: /home/mokoconsulting_demo/mokosuite.demo.mokoconsulting.tech/
|
||||||
# Live: /home/mokoconsulting/mokoconsulting.tech/
|
# Live: /home/mokoconsulting/mokoconsulting.tech/
|
||||||
|
|
||||||
# Check Joomla version
|
# Check Joomla version
|
||||||
@@ -125,7 +125,7 @@ ls htdocs/custom/
|
|||||||
mysql -u root dolibarr -e "SELECT name, value FROM llx_const WHERE name LIKE '%VERSION%';"
|
mysql -u root dolibarr -e "SELECT name, value FROM llx_const WHERE name LIKE '%VERSION%';"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Gitea API Operations
|
## MokoGitea API Operations
|
||||||
|
|
||||||
Use `mcp_mokogitea_api` MCP tools for API operations:
|
Use `mcp_mokogitea_api` MCP tools for API operations:
|
||||||
|
|
||||||
@@ -144,17 +144,17 @@ Use `mcp_mokobackup` MCP tools:
|
|||||||
|
|
||||||
| Target | Type | What it backs up |
|
| Target | Type | What it backs up |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| gitea-db | mysql | Gitea MySQL database |
|
| gitea-db | mysql | MokoGitea MySQL database |
|
||||||
| gitea-files | files | `/var/lib/gitea/` (repos, data, avatars) |
|
| gitea-files | files | `/var/lib/gitea/` (repos, data, avatars) |
|
||||||
| waas-dev | akeeba | Joomla dev site via Akeeba API |
|
| mokosuite-dev | akeeba | Joomla dev site via Akeeba API |
|
||||||
| waas-demo | akeeba | Joomla demo site |
|
| mokosuite-demo | akeeba | Joomla demo site |
|
||||||
| waas-live | akeeba | Joomla production site |
|
| mokosuite-live | akeeba | Joomla production site |
|
||||||
| crm-live | dolibarr | Dolibarr production (DB + documents + custom) |
|
| crm-live | dolibarr | Dolibarr production (DB + documents + custom) |
|
||||||
| crm-dev | dolibarr | Dolibarr dev |
|
| crm-dev | dolibarr | Dolibarr dev |
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
Deployments are handled by **Gitea Actions workflows** (not manual SSH):
|
Deployments are handled by **MokoGitea Actions workflows** (not manual SSH):
|
||||||
- Push to `dev` → CI runs (lint, build, validate)
|
- Push to `dev` → CI runs (lint, build, validate)
|
||||||
- Merge PR to `main` → release workflow builds ZIP, creates release, deploys via SFTP
|
- Merge PR to `main` → release workflow builds ZIP, creates release, deploys via SFTP
|
||||||
- Client sites: `client-release.yml` workflow handles theme package deployment
|
- Client sites: `client-release.yml` workflow handles theme package deployment
|
||||||
@@ -171,12 +171,12 @@ All repos mirror to GitHub (mokoconsulting-tech org) as backup:
|
|||||||
|
|
||||||
| Path | Contents |
|
| Path | Contents |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `/usr/local/bin/gitea` | Gitea binary |
|
| `/usr/local/bin/gitea` | MokoGitea binary |
|
||||||
| `/etc/gitea/app.ini` | Main configuration |
|
| `/etc/gitea/app.ini` | Main configuration |
|
||||||
| `/var/lib/gitea/` | All Gitea data |
|
| `/var/lib/gitea/` | All MokoGitea data |
|
||||||
| `/var/lib/gitea/repositories/` | Git bare repos |
|
| `/var/lib/gitea/repositories/` | Git bare repos |
|
||||||
| `/var/lib/gitea/data/` | Attachments, avatars, LFS |
|
| `/var/lib/gitea/data/` | Attachments, avatars, LFS |
|
||||||
| `/var/lib/gitea/log/` | Gitea logs |
|
| `/var/lib/gitea/log/` | MokoGitea logs |
|
||||||
| `/var/lib/gitea/custom/` | Custom templates, public files |
|
| `/var/lib/gitea/custom/` | Custom templates, public files |
|
||||||
| `/etc/nginx/sites-enabled/gitea.conf` | Nginx reverse proxy config |
|
| `/etc/nginx/sites-enabled/gitea.conf` | Nginx reverse proxy config |
|
||||||
| `/home/git/.act_runner/` | Actions runner config |
|
| `/home/git/.act_runner/` | Actions runner config |
|
||||||
@@ -184,7 +184,7 @@ All repos mirror to GitHub (mokoconsulting-tech org) as backup:
|
|||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
- Port 2918 on GIT server is **shell SSH** (not just git protocol) — full command execution
|
- Port 2918 on GIT server is **shell SSH** (not just git protocol) — full command execution
|
||||||
- Gitea repo names on server use **hyphens** (e.g. `mcp-mokobackup`), local dirs use **underscores**
|
- MokoGitea repo names on server use **hyphens** (e.g. `mcp-mokobackup`), local dirs use **underscores**
|
||||||
- `mokocli` CLI tools handle CI checks — don't inline bash in workflows
|
- `mokocli` CLI tools handle CI checks — don't inline bash in workflows
|
||||||
- All infra docs live in **mokogitea-private wiki**, not public repos
|
- All infra docs live in **mokogitea-private wiki**, not public repos
|
||||||
- Two master SSH keys (jmiller + moko) on all servers
|
- Two master SSH keys (jmiller + moko) on all servers
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ src/
|
|||||||
|
|
||||||
- Config defines **connections** for health checks + optional **Grafana** config
|
- Config defines **connections** for health checks + optional **Grafana** config
|
||||||
- Sites list at `A:/mokocli/monitoring/sites.json` for bulk monitoring
|
- Sites list at `A:/mokocli/monitoring/sites.json` for bulk monitoring
|
||||||
- Grafana at bench.mokoconsulting.tech — WaaS dashboard for uptime/performance
|
- Grafana at bench.mokoconsulting.tech — MokoSuite dashboard for uptime/performance
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|
||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ assignees: ''
|
|||||||
- [ ] API response error (4xx / 5xx)
|
- [ ] API response error (4xx / 5xx)
|
||||||
|
|
||||||
### MCP Server
|
### MCP Server
|
||||||
- **Server Name**: [e.g., mcp_mokowaas]
|
- **Server Name**: [e.g., mcp_mokosuite]
|
||||||
- **Server Version**: [e.g., 1.0.0]
|
- **Server Version**: [e.g., 1.0.0]
|
||||||
- **Node.js Version**: [e.g., 20.x]
|
- **Node.js Version**: [e.g., 20.x]
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ MCP server for infrastructure monitoring -- server health, Grafana dashboards, a
|
|||||||
| **Language** | Node.js |
|
| **Language** | Node.js |
|
||||||
| **License** | GPL-3.0-or-later |
|
| **License** | GPL-3.0-or-later |
|
||||||
| **Config** | `~/.monitor-mcp.json` |
|
| **Config** | `~/.monitor-mcp.json` |
|
||||||
| **Platform** | [Gitea](https://git.mokoconsulting.tech/MokoConsulting/monitor-mcp) (primary) |
|
| **Platform** | [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/monitor-mcp) (primary) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ src/
|
|||||||
|
|
||||||
- Config defines **connections** for health checks + optional **Grafana** config
|
- Config defines **connections** for health checks + optional **Grafana** config
|
||||||
- Sites list at `A:/mokocli/monitoring/sites.json` for bulk monitoring
|
- Sites list at `A:/mokocli/monitoring/sites.json` for bulk monitoring
|
||||||
- Grafana at bench.mokoconsulting.tech — WaaS dashboard for uptime/performance
|
- Grafana at bench.mokoconsulting.tech — MokoSuite dashboard for uptime/performance
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|
||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ assignees: ''
|
|||||||
- [ ] API response error (4xx / 5xx)
|
- [ ] API response error (4xx / 5xx)
|
||||||
|
|
||||||
### MCP Server
|
### MCP Server
|
||||||
- **Server Name**: [e.g., mcp_mokowaas]
|
- **Server Name**: [e.g., mcp_mokosuite]
|
||||||
- **Server Version**: [e.g., 1.0.0]
|
- **Server Version**: [e.g., 1.0.0]
|
||||||
- **Node.js Version**: [e.g., 20.x]
|
- **Node.js Version**: [e.g., 20.x]
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ src/
|
|||||||
| Name | Host | User | Port |
|
| Name | Host | User | Port |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| GIT | git.mokoconsulting.tech | mokoconsulting | 2918 |
|
| GIT | git.mokoconsulting.tech | mokoconsulting | 2918 |
|
||||||
| WAAS_DEV | waas.dev.mokoconsulting.tech | mokoconsulting_dev | 22 |
|
| WAAS_DEV | mokosuite.dev.mokoconsulting.tech | mokoconsulting_dev | 22 |
|
||||||
| WAAS_DEMO | waas.demo.mokoconsulting.tech | mokoconsulting_demo | 22 |
|
| WAAS_DEMO | mokosuite.demo.mokoconsulting.tech | mokoconsulting_demo | 22 |
|
||||||
| WAAS_LIVE | mokoconsulting.tech | mokoconsulting | 22 |
|
| WAAS_LIVE | mokoconsulting.tech | mokoconsulting | 22 |
|
||||||
| CRM_DEV | waas.dev.mokoconsulting.tech | mokoconsulting_dev | 22 |
|
| CRM_DEV | mokosuite.dev.mokoconsulting.tech | mokoconsulting_dev | 22 |
|
||||||
| CRM_LIVE | crm.mokoconsulting.tech | mokoconsulting_crm | 22 |
|
| CRM_LIVE | crm.mokoconsulting.tech | mokoconsulting_crm | 22 |
|
||||||
|
|
||||||
SSH key: `jmiller_private.openssh`
|
SSH key: `jmiller_private.openssh`
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ assignees: ''
|
|||||||
- [ ] API response error (4xx / 5xx)
|
- [ ] API response error (4xx / 5xx)
|
||||||
|
|
||||||
### MCP Server
|
### MCP Server
|
||||||
- **Server Name**: [e.g., mcp_mokowaas]
|
- **Server Name**: [e.g., mcp_mokosuite]
|
||||||
- **Server Version**: [e.g., 1.0.0]
|
- **Server Version**: [e.g., 1.0.0]
|
||||||
- **Node.js Version**: [e.g., 20.x]
|
- **Node.js Version**: [e.g., 20.x]
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Model Context Protocol server for SSH remote server management -- execute comman
|
|||||||
| **Tools** | 37 tools across 6 groups |
|
| **Tools** | 37 tools across 6 groups |
|
||||||
| **License** | MIT |
|
| **License** | MIT |
|
||||||
| **Upstream** | [bvisible/mcp-ssh-manager](https://github.com/bvisible/mcp-ssh-manager) v3.4.0 |
|
| **Upstream** | [bvisible/mcp-ssh-manager](https://github.com/bvisible/mcp-ssh-manager) v3.4.0 |
|
||||||
| **Platform** | [Gitea](https://git.mokoconsulting.tech/MokoConsulting/ssh-mcp) (primary) |
|
| **Platform** | [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/ssh-mcp) (primary) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ src/
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Config defines **connections** — each is a Joomla site with URL + API token
|
- Config defines **connections** — each is a Joomla site with URL + API token
|
||||||
- Default connections: moko-live (mokoconsulting.tech), moko-dev (waas.dev), moko-demo (waas.demo)
|
- Default connections: moko-live (mokoconsulting.tech), moko-dev (mokosuite.dev), moko-demo (mokosuite.demo)
|
||||||
- Client sites added via client repo config overrides
|
- Client sites added via client repo config overrides
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
@@ -39,5 +39,5 @@ src/
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -148,13 +148,13 @@ Every repo maintains 5 standard release channel tags:
|
|||||||
|
|
||||||
### CI/CD
|
### CI/CD
|
||||||
|
|
||||||
- Gitea Actions runs all CI workflows
|
- MokoGitea Actions runs all CI workflows
|
||||||
- GitHub Actions are disabled on mirrored repos
|
- GitHub Actions are disabled on mirrored repos
|
||||||
- Workflows live in both `.github/workflows/` and `.gitea/workflows/`
|
- Workflows live in both `.github/workflows/` and `.gitea/workflows/`
|
||||||
|
|
||||||
### Update Servers (Joomla)
|
### Update Servers (Joomla)
|
||||||
|
|
||||||
In manifest `<updateservers>`, Gitea must be priority 1, GitHub priority 2.
|
In manifest `<updateservers>`, MokoGitea must be priority 1, GitHub priority 2.
|
||||||
|
|
||||||
### Secrets
|
### Secrets
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Model Context Protocol server for the Joomla Web Services API -- full CRUD for a
|
|||||||
| **Language** | Node.js |
|
| **Language** | Node.js |
|
||||||
| **Tools** | 67 tools across 15 resource groups |
|
| **Tools** | 67 tools across 15 resource groups |
|
||||||
| **License** | GPL-3.0-or-later |
|
| **License** | GPL-3.0-or-later |
|
||||||
| **Platform** | [Gitea](https://git.mokoconsulting.tech/MokoConsulting/joomla-api-mcp) (primary) |
|
| **Platform** | [MokoGitea](https://git.mokoconsulting.tech/MokoConsulting/joomla-api-mcp) (primary) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Only the current major version receives security updates. Users should upgrade t
|
|||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
Report security vulnerabilities via Gitea issue (preferred):
|
Report security vulnerabilities via MokoGitea issue (preferred):
|
||||||
https://git.mokoconsulting.tech/MokoConsulting/MokoCli-Template-Generic/issues/new?template=security.yaml
|
https://git.mokoconsulting.tech/MokoConsulting/MokoCli-Template-Generic/issues/new?template=security.yaml
|
||||||
|
|
||||||
Or email: hello@mokoconsulting.tech
|
Or email: hello@mokoconsulting.tech
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ src/
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: `Authored-by: Moko Consulting`
|
- **Attribution**: `Authored-by: Moko Consulting`
|
||||||
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files
|
||||||
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
- **Standards**: [MokoCli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ assignees: ''
|
|||||||
- [ ] API response error (4xx / 5xx)
|
- [ ] API response error (4xx / 5xx)
|
||||||
|
|
||||||
### MCP Server
|
### MCP Server
|
||||||
- **Server Name**: [e.g., mcp_mokowaas]
|
- **Server Name**: [e.g., mcp_mokosuite]
|
||||||
- **Server Version**: [e.g., 1.0.0]
|
- **Server Version**: [e.g., 1.0.0]
|
||||||
- **Node.js Version**: [e.g., 20.x]
|
- **Node.js Version**: [e.g., 20.x]
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ else
|
|||||||
["MokoConsulting/ssh-mcp"]="ssh-mcp"
|
["MokoConsulting/ssh-mcp"]="ssh-mcp"
|
||||||
["MokoConsulting/backup-mcp"]="backup-mcp"
|
["MokoConsulting/backup-mcp"]="backup-mcp"
|
||||||
["MokoConsulting/joomla-api-mcp"]="joomla-api-mcp"
|
["MokoConsulting/joomla-api-mcp"]="joomla-api-mcp"
|
||||||
["MokoConsulting/Template-Client-WaaS"]="Template-Client-WaaS"
|
["MokoConsulting/Template-Client"]="Template-Client"
|
||||||
["ClarksvilleFurs/client-waas-clarksvillefurs"]="client-clarksvillefurs"
|
["ClarksvilleFurs/client-waas-clarksvillefurs"]="client-clarksvillefurs"
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user