@mokoconsulting/mcp-mokosuite 1.1.0-dev.372 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +0,0 @@
1
- # +========================================================================+
2
- # | Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech> |
3
- # | SPDX-License-Identifier: GPL-3.0-or-later |
4
- # | |
5
- # | BRIEF: Clean, formatted ntfy notification on push to a default branch. |
6
- # | Issues use an org-level webhook; releases use notify.yml. |
7
- # +========================================================================+
8
- name: "Universal: Push Notifications"
9
-
10
- on:
11
- push:
12
- branches: [main, master]
13
-
14
- permissions:
15
- contents: read
16
-
17
- env:
18
- NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }}
19
- NTFY_TOKEN: ${{ secrets.NTFY_TOKEN }}
20
-
21
- jobs:
22
- push-notify:
23
- runs-on: ubuntu-latest
24
- steps:
25
- - name: Notify push
26
- # Untrusted values (commit message, actor) passed via env — never
27
- # interpolated directly into the shell — to avoid command injection.
28
- env:
29
- REPO: ${{ github.repository }}
30
- BRANCH: ${{ github.ref_name }}
31
- ACTOR: ${{ github.actor }}
32
- MSG: ${{ github.event.head_commit.message }}
33
- CLICK: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
34
- run: |
35
- SUMMARY=$(printf '%s\n' "$MSG" | head -n1)
36
- curl -sS --retry 3 --retry-connrefused --retry-delay 2 --max-time 20 \
37
- -H "Title: ${REPO}: push to ${BRANCH}" \
38
- -H "Tags: package" \
39
- -H "Priority: default" \
40
- -H "Click: ${CLICK}" \
41
- -H "Authorization: Bearer ${NTFY_TOKEN}" \
42
- -d "${ACTOR}: ${SUMMARY}" \
43
- "${NTFY_URL}/mokogit-push" || echo "::warning::ntfy notification could not be delivered (non-fatal)"
@@ -1,130 +0,0 @@
1
- # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
- #
3
- # This file is part of a Moko Consulting project.
4
- #
5
- # SPDX-License-Identifier: GPL-3.0-or-later
6
- #
7
- # FILE INFORMATION
8
- # DEFGROUP: GitHub.Workflow
9
- # INGROUP: MokoStandards.Automation
10
- # REPO: https://github.com/mokoconsulting-tech/MokoStandards
11
- # PATH: /templates/workflows/shared/sync-version-on-merge.yml.template
12
- # VERSION: 04.06.00
13
- # BRIEF: Auto-bump patch version on every push to main and propagate to all file headers
14
- # NOTE: Synced via bulk-repo-sync to .mokogit/workflows/sync-version-on-merge.yml in all governed repos.
15
- # README.md is the single source of truth for the repository version.
16
-
17
- name: "Universal: Sync Version on Merge"
18
-
19
- on:
20
- push:
21
- branches:
22
- - main
23
- - master
24
- workflow_dispatch:
25
- inputs:
26
- dry_run:
27
- description: 'Dry run (preview only, no commit)'
28
- type: boolean
29
- default: false
30
-
31
- permissions:
32
- contents: write
33
- issues: write
34
-
35
- env:
36
- FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
37
-
38
- jobs:
39
- sync-version:
40
- name: Propagate README version
41
- runs-on: ubuntu-latest
42
-
43
- steps:
44
- - name: Checkout repository
45
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
46
- with:
47
- token: ${{ secrets.GH_TOKEN || github.token }}
48
- fetch-depth: 0
49
-
50
- - name: Setup MokoStandards tools
51
- run: |
52
- # Use pre-installed mokoplatform on runner host (symlink /opt/mokoplatform -> /opt/moko-platform)
53
- if [ -d /opt/mokoplatform/api/cli ] && [ -f /opt/mokoplatform/vendor/autoload.php ]; then
54
- ln -sf /opt/mokoplatform /tmp/mokostandards
55
- echo "Using pre-installed /opt/mokoplatform"
56
- elif [ -d /opt/moko-platform/api/cli ]; then
57
- ln -sf /opt/moko-platform /tmp/mokostandards
58
- echo "Using pre-installed /opt/moko-platform"
59
- else
60
- echo "::warning::MokoStandards tools not found on runner - skipping"
61
- echo "MOKO_SKIP=true" >> "$GITHUB_ENV"
62
- fi
63
-
64
- - name: Auto-bump patch version
65
- if: ${{ github.event_name == 'push' && github.actor != 'github-actions[bot]' }}
66
- run: |
67
- if git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -q '^README\.md$'; then
68
- echo "README.md changed in this push — skipping auto-bump"
69
- exit 0
70
- fi
71
-
72
- RESULT=$(php /tmp/mokostandards/api/cli/version_bump.php --path .) || {
73
- echo "⚠️ Could not bump version — skipping"
74
- exit 0
75
- }
76
- echo "Auto-bumping patch: $RESULT"
77
- git config --local user.email "github-actions[bot]@users.noreply.github.com"
78
- git config --local user.name "github-actions[bot]"
79
- git add README.md
80
- git commit -m "chore(version): auto-bump patch ${RESULT} [skip ci]" \
81
- --author="github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
82
- git push
83
-
84
- - name: Extract version from README.md
85
- id: readme_version
86
- run: |
87
- git pull --ff-only 2>/dev/null || true
88
- VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null)
89
- if [ -z "$VERSION" ]; then
90
- echo "⚠️ No VERSION in README.md — skipping propagation"
91
- echo "skip=true" >> $GITHUB_OUTPUT
92
- exit 0
93
- fi
94
- echo "version=$VERSION" >> $GITHUB_OUTPUT
95
- echo "skip=false" >> $GITHUB_OUTPUT
96
- echo "✅ README.md version: $VERSION"
97
-
98
- - name: Run version sync
99
- if: ${{ steps.readme_version.outputs.skip != 'true' && inputs.dry_run != true }}
100
- run: |
101
- php /tmp/mokostandards/api/maintenance/update_version_from_readme.php \
102
- --path . \
103
- --create-issue \
104
- --repo "${{ github.repository }}"
105
- env:
106
- GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }}
107
-
108
- - name: Commit updated files
109
- if: ${{ steps.readme_version.outputs.skip != 'true' && inputs.dry_run != true }}
110
- run: |
111
- git pull --ff-only 2>/dev/null || true
112
- if git diff --quiet; then
113
- echo "ℹ️ No version changes needed — already up to date"
114
- exit 0
115
- fi
116
- VERSION="${{ steps.readme_version.outputs.version }}"
117
- git config --local user.email "github-actions[bot]@users.noreply.github.com"
118
- git config --local user.name "github-actions[bot]"
119
- git add -A
120
- git commit -m "chore(version): sync badges and headers to ${VERSION} [skip ci]" \
121
- --author="github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
122
- git push
123
-
124
- - name: Summary
125
- run: |
126
- VERSION="${{ steps.readme_version.outputs.version }}"
127
- echo "## 📦 Version Sync — ${VERSION}" >> $GITHUB_STEP_SUMMARY
128
- echo "" >> $GITHUB_STEP_SUMMARY
129
- echo "**Source:** \`README.md\` FILE INFORMATION block" >> $GITHUB_STEP_SUMMARY
130
- echo "**Version:** \`${VERSION}\`" >> $GITHUB_STEP_SUMMARY
@@ -1,131 +0,0 @@
1
- # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
- #
3
- # SPDX-License-Identifier: GPL-3.0-or-later
4
- #
5
- # FILE INFORMATION
6
- # DEFGROUP: MokoGIT.Workflow.Template
7
- # INGROUP: MokoCLI.CI
8
- # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
9
- # PATH: /.mokogit/workflows/version-set.yml
10
- # VERSION: 01.01.00
11
- # BRIEF: Set or reset the project version across all version-bearing files (README / CHANGELOG / file-header blocks universal; the Joomla manifest step is guarded and no-ops on non-Joomla repos)
12
-
13
- name: "Universal: Set Version"
14
-
15
- on:
16
- workflow_dispatch:
17
- inputs:
18
- version:
19
- description: "Version number (e.g. 01.00.00)"
20
- required: true
21
- type: string
22
- branch:
23
- description: "Branch to update (default: current)"
24
- required: false
25
- type: string
26
-
27
- permissions:
28
- contents: write
29
-
30
- env:
31
- FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
32
-
33
- jobs:
34
- set-version:
35
- name: Set Version to ${{ inputs.version }}
36
- runs-on: ubuntu-latest
37
- if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
38
-
39
- steps:
40
- - name: Validate version format
41
- run: |
42
- VERSION="${{ inputs.version }}"
43
- if ! echo "$VERSION" | grep -qP '^\d{2}\.\d{2}\.\d{2}$'; then
44
- echo "::error::Invalid version format '${VERSION}' — expected XX.YY.ZZ (e.g. 01.00.00)"
45
- exit 1
46
- fi
47
- echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
48
-
49
- - name: Checkout
50
- uses: actions/checkout@v4
51
- with:
52
- token: ${{ secrets.MOKOGIT_TOKEN || github.token }}
53
- ref: ${{ inputs.branch || github.ref }}
54
- fetch-depth: 1
55
-
56
- - name: Update manifest version
57
- run: |
58
- MANIFEST=""
59
- for XML_FILE in $(find . -maxdepth 3 -name "*.xml" -not -path "./.git/*" -not -path "./vendor/*"); do
60
- if grep -q "<extension" "$XML_FILE" 2>/dev/null; then
61
- MANIFEST="$XML_FILE"
62
- break
63
- fi
64
- done
65
-
66
- if [ -z "$MANIFEST" ]; then
67
- echo "::warning::No Joomla extension manifest found — skipping manifest update"
68
- else
69
- OLD_VER=$(grep -oP '<version>\K[^<]+' "$MANIFEST" | head -1)
70
- sed -i "s|<version>${OLD_VER}</version>|<version>${VERSION}</version>|" "$MANIFEST"
71
- echo "Manifest: ${OLD_VER} → ${VERSION} (${MANIFEST})"
72
- fi
73
-
74
- - name: Update README.md version
75
- run: |
76
- if [ -f "README.md" ]; then
77
- if grep -qP '^\s*VERSION:\s*\d' README.md; then
78
- sed -i -E "s/(VERSION:\s*)[0-9]{2}\.[0-9]{2}\.[0-9]{2}/\1${VERSION}/" README.md
79
- echo "README.md version updated to ${VERSION}"
80
- else
81
- echo "::warning::No VERSION line found in README.md — skipping"
82
- fi
83
- fi
84
-
85
- - name: Update CHANGELOG.md
86
- run: |
87
- if [ -f "CHANGELOG.md" ]; then
88
- DATE=$(date +%Y-%m-%d)
89
- # Check if this version already has an entry
90
- if grep -q "^\#\# \[${VERSION}\]" CHANGELOG.md; then
91
- echo "CHANGELOG.md already has entry for ${VERSION} — skipping"
92
- else
93
- # Insert new version entry after [Unreleased] or at the top after header
94
- if grep -q '^\#\# \[Unreleased\]' CHANGELOG.md; then
95
- sed -i "/^\#\# \[Unreleased\]/a\\\\n## [${VERSION}] --- ${DATE}" CHANGELOG.md
96
- else
97
- sed -i "/^\# Changelog/a\\\\n## [Unreleased]\n\n## [${VERSION}] --- ${DATE}" CHANGELOG.md
98
- fi
99
- echo "CHANGELOG.md: added entry for ${VERSION}"
100
- fi
101
- else
102
- echo "::warning::No CHANGELOG.md found — skipping"
103
- fi
104
-
105
- - name: Update FILE INFORMATION blocks
106
- run: |
107
- # Update VERSION in file header blocks (# VERSION: XX.YY.ZZ)
108
- find . -maxdepth 1 -type f \( -name "*.yml" -o -name "*.yaml" -o -name "*.php" -o -name "*.md" \) \
109
- -not -path "./.git/*" -not -path "./vendor/*" -print0 2>/dev/null | \
110
- while IFS= read -r -d '' FILE; do
111
- if head -20 "$FILE" | grep -qP '^\s*#?\s*VERSION:\s*\d{2}\.\d{2}\.\d{2}'; then
112
- sed -i -E "s/(#?\s*VERSION:\s*)[0-9]{2}\.[0-9]{2}\.[0-9]{2}/\1${VERSION}/" "$FILE"
113
- echo "Updated FILE INFORMATION VERSION in ${FILE}"
114
- fi
115
- done
116
-
117
- - name: Commit and push
118
- run: |
119
- git config user.name "Moko Consulting [bot]"
120
- git config user.email "hello@mokoconsulting.tech"
121
- git add -A
122
- if git diff --cached --quiet; then
123
- echo "No version changes detected — nothing to commit"
124
- else
125
- git commit -m "chore: set version to ${VERSION} [skip bump]
126
-
127
- Authored-by: Moko Consulting"
128
- git push
129
- echo "### Version Set" >> $GITHUB_STEP_SUMMARY
130
- echo "Version updated to \`${VERSION}\` on branch \`${GITHUB_REF_NAME}\`" >> $GITHUB_STEP_SUMMARY
131
- fi