Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/agents-md-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
agents-md:
permissions:
contents: read
uses: Comfy-Org/github-workflows/.github/workflows/agents-md-integrity.yml@1376eeff8a7a27caf9813e0da7f576fa47ea1989 # github-workflows main (1376eef)
uses: Comfy-Org/github-workflows/.github/workflows/agents-md-integrity.yml@c6b3effa6d2e9fff97500d9688b54106f556c433 # github-workflows main (c6b3eff)
with:
workflows_ref: 1376eeff8a7a27caf9813e0da7f576fa47ea1989
workflows_ref: c6b3effa6d2e9fff97500d9688b54106f556c433
2 changes: 1 addition & 1 deletion .github/workflows/anchor-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cms-changelog-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cms-published-versions-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cms-scripts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/code-pages-check.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@v4
with:
package-manager-cache: false
node-version: '20'

- name: Install Mint CLI
run: npm install -g mint@4.2.700
run: npm install -g mint

- name: Run Broken Links Check
run: mint broken-links
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external-link-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
issues: write
steps:
- name: Checkout documentation repo
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
Expand Down
104 changes: 0 additions & 104 deletions .github/workflows/giscus-path-map-update.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/i18n-scripts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
Expand Down
50 changes: 9 additions & 41 deletions .github/workflows/i18n-sync-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -30,13 +30,11 @@ jobs:
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}"

- name: Comment i18n sync status on PR
- name: Notify translator on PR
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHECK_I18N_OUTPUT: /tmp/i18n-check.json
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
PR_BASE_REPO: ${{ github.repository }}
run: |
if [ ! -f "$CHECK_I18N_OUTPUT" ]; then
echo "No check output; skipping comment."
Expand All @@ -46,63 +44,33 @@ jobs:
MISSING=$(node -e "
const data = require('$CHECK_I18N_OUTPUT');
if (data.skipped) process.exit(2);
const sameRepository = process.env.PR_HEAD_REPO === process.env.PR_BASE_REPO;
const autoTranslated = new Set(sameRepository ? [
'ja/development/comfy-router/pricing.mdx',
'zh/development/comfy-router/pricing.mdx',
'ko/development/comfy-router/pricing.mdx',
] : []);
const n = Object.values(data.missingByLang || {}).reduce((s, v) => s + v.files.filter(f => !autoTranslated.has(f)).length, 0);
const n = Object.values(data.missingByLang || {}).reduce((s, v) => s + v.files.length, 0);
if (n === 0) process.exit(2);
process.stdout.write(String(n));
" 2>/dev/null) || true

if [ -z "$MISSING" ]; then
REPO="${{ github.repository }}"
PR_NUMBER="${{ github.event.pull_request.number }}"
MARKER="<!-- i18n-sync-check -->"
EXISTING_ID=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" \
--jq '.[] | select(.body | contains("'"$MARKER"'")) | .id' | head -1)
if [ -n "$EXISTING_ID" ]; then
gh api -X DELETE "repos/${REPO}/issues/comments/${EXISTING_ID}"
echo "Removed the resolved i18n reminder comment."
fi
echo "No missing translations; skipping PR comment."
exit 0
fi

BODY_FILE=/tmp/i18n-comment.md
BODY_FILE="$BODY_FILE" node -e "
const data = require(process.env.CHECK_I18N_OUTPUT);
const sameRepository = process.env.PR_HEAD_REPO === process.env.PR_BASE_REPO;
const autoTranslated = new Set(sameRepository ? [
'ja/development/comfy-router/pricing.mdx',
'zh/development/comfy-router/pricing.mdx',
'ko/development/comfy-router/pricing.mdx',
] : []);
const groups = Object.entries(data.missingByLang)
.map(([code, { name, files }]) => ({ code, name, files: files.filter(f => !autoTranslated.has(f)) }))
.filter(g => g.files.length > 0);
const total = groups.reduce((s, g) => s + g.files.length, 0);
const plural = (n) => n + ' file' + (n === 1 ? '' : 's');
const lines = [
'## 🌐 i18n translation sync check',
'## 🌐 i18n translation sync reminder',
'',
'English docs changed in this PR. ' + plural(total) + ' in ' + groups.length + ' language' + (groups.length === 1 ? '' : 's') + ' may not be synced yet. The automated translation workflow handles these updates. Expand a language to see the files.',
'@comfyui-wiki English documentation was updated in this PR. Please complete or schedule translation updates for the following files:',
'',
];
for (const { code, name, files } of groups) {
lines.push('<details>');
lines.push('<summary>' + name + ' (<code>' + code + '</code>): ' + plural(files.length) + '</summary>');
lines.push('');
for (const f of files) lines.push('- <code>' + f.replace(/[&<>\`]/g, c => '&#' + c.charCodeAt(0) + ';') + '</code>');
lines.push('');
lines.push('</details>');
for (const [code, { name, files }] of Object.entries(data.missingByLang)) {
lines.push('### ' + name + ' (\`' + code + '\`)');
for (const f of files) lines.push('- \`' + f + '\`');
lines.push('');
}
lines.push('---');
lines.push('');
lines.push('**Local sync:** \`npm run translate\` (see [README: Automated translation](https://github.com/${{ github.repository }}/blob/main/README.md#automated-translation))');
lines.push('**Local sync:** \`npm run translate\` (see [README — Automated translation](https://github.com/${{ github.repository }}/blob/main/README.md#automated-translation))');
lines.push('');
lines.push('<!-- i18n-sync-check -->');
require('fs').writeFileSync(process.env.BODY_FILE, lines.join('\n'));
Expand Down
Loading
Loading