diff --git a/.mokogitea/workflows/ci-platform.yml b/.mokogitea/workflows/ci-platform.yml index 5de36f5..0ac3fe8 100644 --- a/.mokogitea/workflows/ci-platform.yml +++ b/.mokogitea/workflows/ci-platform.yml @@ -115,7 +115,7 @@ jobs: - name: "PHPCS (PSR-12)" run: | - vendor/bin/phpcs --standard=phpcs.xml --report=summary --warning-severity=0 lib/ validate/ automation/ 2>&1 || { + vendor/bin/phpcs --standard=phpcs.xml --report=summary --warning-severity=0 lib/ validate/ 2>&1 || { echo "::error::PHPCS found coding standard violations" echo "### PHPCS" >> $GITHUB_STEP_SUMMARY echo "Coding standard violations detected. Run \`composer phpcs\` locally." >> $GITHUB_STEP_SUMMARY diff --git a/.mokogitea/workflows/pr-check.yml b/.mokogitea/workflows/pr-check.yml index 1652713..28696dc 100644 --- a/.mokogitea/workflows/pr-check.yml +++ b/.mokogitea/workflows/pr-check.yml @@ -47,15 +47,15 @@ jobs: fi ;; fix/*|bugfix/*) - if [ "$BASE" != "dev" ]; then + if [ "$BASE" != "dev" ] && [ "$BASE" != "main" ]; then ALLOWED=false - REASON="Fix branches must target 'dev', not '${BASE}'" + REASON="Fix branches must target 'dev' or 'main', not '${BASE}'" fi ;; patch/*) - if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ]; then + if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ] && [ "$BASE" != "main" ]; then ALLOWED=false - REASON="Patch branches must target 'dev' or 'rc', not '${BASE}'" + REASON="Patch branches must target 'dev', 'rc', or 'main', not '${BASE}'" fi ;; hotfix/*) @@ -86,7 +86,8 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY - echo "- \`fix/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY + echo "- \`fix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY + echo "- \`patch/*\` → \`dev\`, \`rc\`, or \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY @@ -147,11 +148,12 @@ jobs: - name: Detect platform id: platform run: | - # Read platform from XML manifest ( tag) or plain text fallback - PLATFORM=$(sed -n 's/.*\([^<]*\)<\/platform>.*/\1/p' .mokogitea/manifest.xml 2>/dev/null | head -1) - [ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/manifest.xml 2>/dev/null | tr -d '[:space:]') + # Platform comes from the MokoGitea metadata API (public GET); manifest.xml is no longer used. + 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)" [ -z "$PLATFORM" ] && PLATFORM="generic" echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" + echo "Detected platform: $PLATFORM" - name: Setup PHP if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr' diff --git a/.mokogitea/workflows/sync-on-merge.yml b/.mokogitea/workflows/sync-on-merge.yml index 1b882bc..98ee72c 100644 --- a/.mokogitea/workflows/sync-on-merge.yml +++ b/.mokogitea/workflows/sync-on-merge.yml @@ -26,6 +26,6 @@ jobs: run: composer install --no-dev --no-interaction - name: Sync workflows to generic repos - run: php automation/bulk_sync.php --platform generic --org MokoConsulting --workflows-only --auto-merge --token "${{ secrets.MOKOGITEA_TOKEN }}" + run: php wrappers/bulk_sync.php --platform generic --org MokoConsulting --workflows-only --auto-merge --token "${{ secrets.MOKOGITEA_TOKEN }}" env: MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4276f..708fedb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ BRIEF: Release changelog # Changelog ## [Unreleased] +### Fixed +- pr-check.yml branch policy: allow `fix/*` → `main` and `patch/*` → `main` (were restricted to dev/rc), matching documented branch policy +- pr-check.yml platform detection: read platform from the MokoGitea metadata API instead of `.mokogitea/manifest.xml` (manifest.xml is no longer used); no longer aborts under `set -e` when the file is absent +- CI Gate 1: drop references to the removed `automation/` directory in `phpcs`/`phpstan` (ci-platform.yml, phpcs.xml, phpstan.neon, composer.json) so Code Quality no longer hard-fails on a missing path +- sync-on-merge.yml: call `wrappers/bulk_sync.php` (moved from `automation/bulk_sync.php`) so post-merge workflow sync works again +- Remove dangling `mcp/servers/mokogitea_api` and `mcp/servers/windows/mcp_windows` submodule gitlinks (no `.gitmodules` entries) that broke `submodule update --init` at checkout + ## [09.41.00] --- 2026-06-27 ## [09.41.00] --- 2026-06-27 diff --git a/composer.json b/composer.json index e612f76..3c1a264 100644 --- a/composer.json +++ b/composer.json @@ -71,8 +71,8 @@ ], "scripts": { "test": "phpunit", - "phpcs": "phpcs --standard=phpcs.xml lib/ validate/ automation/", - "phpstan": "phpstan analyse -c phpstan.neon lib/ validate/ automation/", + "phpcs": "phpcs --standard=phpcs.xml lib/ validate/", + "phpstan": "phpstan analyse -c phpstan.neon lib/ validate/", "psalm": "psalm --config=psalm.xml", "check": [ "@phpcs", diff --git a/mcp/servers/mokogitea_api b/mcp/servers/mokogitea_api deleted file mode 160000 index 44e1259..0000000 --- a/mcp/servers/mokogitea_api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 44e1259c3e9ecd1caeffd7717359fee9c29106d7 diff --git a/mcp/servers/windows/mcp_windows b/mcp/servers/windows/mcp_windows deleted file mode 160000 index 4ae12d4..0000000 --- a/mcp/servers/windows/mcp_windows +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4ae12d459bd5d8402fac3a282464b73c37aa85f9 diff --git a/phpcs.xml b/phpcs.xml index 67b03e7..1850ac1 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -12,7 +12,6 @@ SPDX-License-Identifier: GPL-3.0-or-later lib validate - automation cli diff --git a/phpstan.neon b/phpstan.neon index 02d68f9..05c8746 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,7 +10,6 @@ parameters: paths: - lib - validate - - automation - cli excludePaths: analyseAndScan: