-
Notifications
You must be signed in to change notification settings - Fork 43
chore(pre-commit.ci): pre-commit autoupdate #1085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR performs routine automated pre-commit hook updates and refactors the AI translation workflow to pass translation content directly to the AI inference action instead of using file-based input with GitHub MCP integration.
Key Changes:
- Updates three pre-commit hook versions (ruff, markdownlint-cli, gitleaks)
- Modifies AI translation workflow to prepare and pass translation content as inline YAML parameters
- Updates prompt template to reference the new
translation_contentparameter
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.pre-commit-config.yaml |
Bumps versions for ruff (v0.14.6→v0.14.7), markdownlint-cli (v0.45.0→v0.46.0), and gitleaks (v8.29.1→v8.30.0) |
.github/workflows/ai-translation.yml |
Adds "Prepare translation payload" step to JSON-encode file content and passes it inline via translation_content parameter; removes file_input and enable-github-mcp configuration |
.github/prompts/ai-translation-user.prompt.yml |
Adds {{translation_content}} placeholder to receive translation strings directly in the prompt |
.github/workflows/ai-translation.yml
Outdated
| - name: Prepare translation payload | ||
| id: translation_payload | ||
| run: | | ||
| python -c "import json, os; from pathlib import Path; content = Path('${{ matrix.file }}').read_text(encoding='utf-8'); fh = open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8'); fh.write('json=' + json.dumps(content) + '\n'); fh.close()" |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The Python one-liner is difficult to read and maintain. Consider breaking it into a separate Python script file for better readability and easier debugging.
For example, create a script like .github/scripts/prepare_translation_payload.py:
#!/usr/bin/env python3
import json
import os
import sys
from pathlib import Path
translation_file = sys.argv[1]
content = Path(translation_file).read_text(encoding='utf-8')
with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as fh:
fh.write('json=' + json.dumps(content) + '\n')Then call it with:
run: python .github/scripts/prepare_translation_payload.py "${{ matrix.file }}"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
838d61b to
16ec735
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
No description provided.