Public Access
fix: pr-check platform detection via metadata API, allow fix/patch to main #331
@@ -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
|
||||
|
||||
@@ -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 (<platform> tag) or plain text fallback
|
||||
PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/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'
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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",
|
||||
|
||||
Submodule mcp/servers/mokogitea_api deleted from 44e1259c3e
Submodule mcp/servers/windows/mcp_windows deleted from 4ae12d459b
@@ -12,7 +12,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<!-- Files to check -->
|
||||
<file>lib</file>
|
||||
<file>validate</file>
|
||||
<file>automation</file>
|
||||
<file>cli</file>
|
||||
|
||||
<!-- Exclude vendor and other dependencies -->
|
||||
|
||||
@@ -10,7 +10,6 @@ parameters:
|
||||
paths:
|
||||
- lib
|
||||
- validate
|
||||
- automation
|
||||
- cli
|
||||
excludePaths:
|
||||
analyseAndScan:
|
||||
|
||||
Reference in New Issue
Block a user