feat(jmanus): inhouse tool call v4 #155
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2024-2025 the original author or authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
name: ๐ Check Chinese Content in Jmanus | |
on: | |
pull_request: | |
paths: | |
- 'spring-ai-alibaba-jmanus/src/main/java/**/*.java' | |
- 'spring-ai-alibaba-jmanus/ui-vue3/src/**' | |
permissions: | |
contents: read | |
jobs: | |
check-chinese-content: | |
runs-on: ubuntu-latest | |
name: Check for Chinese content in Jmanus | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Check Chinese content in Jmanus | |
run: | | |
echo "๐ Checking for Chinese content in Jmanus Java and frontend files..." | |
echo "๐ Checking directories:" | |
echo " - spring-ai-alibaba-jmanus/src/main/java" | |
echo " - spring-ai-alibaba-jmanus/ui-vue3/src (excluding i18n files)" | |
echo "" | |
if python tools/scripts/check-chinese-content.py --fail-on-found; then | |
echo "โ No Chinese content found - Check passed!" | |
else | |
echo "" | |
echo "## ๐จ Chinese Content Detected in Jmanus" | |
echo "" | |
echo "Chinese content has been detected in Jmanus Java or frontend files." | |
echo "" | |
echo "### Detailed Check Results:" | |
python tools/scripts/check-chinese-content.py | |
echo "" | |
echo "### Modification Suggestions:" | |
echo "" | |
echo "1. **Chinese Comments** โ Change to English Comments" | |
echo " Example:" | |
echo " // โ Incorrect: // ่ฟๆฏไธไธช็จๆทๆๅก็ฑป" | |
echo " // โ Correct: // This is a user service class" | |
echo "" | |
echo "2. **Chinese Strings** โ Extract to resource files or use English" | |
echo " Example:" | |
echo " // โ Incorrect: String message = \"็จๆทไธๅญๅจ\";" | |
echo " // โ Correct: String message = messageSource.getMessage(\"user.not.found\", null, locale);" | |
echo "" | |
echo "3. **Chinese Identifiers** โ Use English identifiers" | |
echo " Example:" | |
echo " // โ Incorrect: String ็จๆทๅ = \"admin\";" | |
echo " // โ Correct: String username = \"admin\";" | |
echo "" | |
echo "4. **Vue Template Content** โ Use i18n for internationalization" | |
echo " Example:" | |
echo " <!-- โ Incorrect: <div>็จๆท็ฎก็</div> -->" | |
echo " <!-- โ Correct: <div>{{ \$t('user.management') }}</div> -->" | |
echo "" | |
echo "**Note:** i18n configuration files are automatically excluded from this check." | |
echo "" | |
echo "Please fix the Chinese content issues and commit the changes." | |
exit 1 | |
fi |