From 7fa76346b405cd8639d701de89b9b21617d24bf2 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sun, 1 Jun 2025 14:32:39 +1000 Subject: [PATCH] github wf --- .github/workflows/code_checks.yml | 14 ++++++++++---- front/php/templates/language/zh_cn.json | 0 2 files changed, 10 insertions(+), 4 deletions(-) mode change 100644 => 100755 front/php/templates/language/zh_cn.json diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 68553a69..39324990 100755 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -17,15 +17,21 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Check for absolute path URLs + - name: Check for invalid relative 'php/' URLs in frontend code run: | - if grep -rE "['\"]\/php\/" --include=\*.{js,php} .; then - echo "❌ Found absolute path URLs starting with '/php/'. Please use relative paths." + echo "🔍 Checking for relative 'php/' URLs that should be './php/' or '/php/'..." + + MATCHES=$(grep -rE "['\"]php\/" --include=\*.{js,php,html} . | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true + + if [ -n "$MATCHES" ]; then + echo "$MATCHES" + echo "❌ Found improperly relative 'php/' URLs. Use './php/' or '/php/' or a base path." exit 1 else - echo "✅ No absolute path URLs found." + echo "✅ No bad relative 'php/' URLs found." fi + - name: Check Python syntax run: | set -e diff --git a/front/php/templates/language/zh_cn.json b/front/php/templates/language/zh_cn.json old mode 100644 new mode 100755