Skip to content
Merged
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
101 changes: 17 additions & 84 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,22 @@ jobs:
let inErrorBlock = false;

for (const line of lycheeLines) {
// Start/end detection for lychee sections
if (line.startsWith('### Errors in')) {
inErrorBlock = true;
continue;
}
if (line.startsWith('## ') && !line.startsWith('### Errors in')) {
inErrorBlock = false;
}

// Bullet-format errors
if (inErrorBlock && line.startsWith('* [')) {
errors.push(line);
continue;
}

// Table-format errors under "🚫 Errors" sections
if (line.startsWith('🚫 Errors')) {
inErrorBlock = true;
continue;
}
if (inErrorBlock && line.startsWith('| [')) {
errors.push(line);
continue;
// End error block when hitting a new section
if (line.startsWith('##')) {
if (line.startsWith('### Errors in') || line.startsWith('🚫 Errors')) {
inErrorBlock = true;
continue;
} else {
inErrorBlock = false;
continue;
}
}

// Blank line ends current block
if (inErrorBlock && line.trim() === '') {
inErrorBlock = false;
// Capture error lines
if (inErrorBlock) {
if (line.startsWith('* [') || line.startsWith('| [')) {
errors.push(line);
}
}
}

Expand All @@ -198,67 +186,12 @@ jobs:
lycheeReport = 'Lychee reported an error (non-zero exit) but no broken-link rows were parsed. Please check artifacts for details.';
}

const comment = `## 🔗 Broken Links Found in Workflow Files

The link checker found broken or unreachable links in your workflow JSON files.

**Why this matters:** Broken model download links will prevent users from using the workflows properly. All URLs in \`properties.models[].url\` fields and MarkdownNote/Note widgets must be valid and accessible.

### ❌ Failed Links:
const comment = `## ❌ Broken Links Found

${lycheeReport}

${excludedReport ? '---\n\n' + excludedReport + '\n\n**Note:** These links are intentionally excluded from checking. If you need to modify the exclusion rules, edit \`.lycheeignore\`.\n\n' : ''}

### Common Issues:

1. **404 Not Found**: The file or page doesn't exist
- Verify the URL is correct
- Check if the file was moved or renamed
- Update to the correct URL

2. **Timeout**: Server didn't respond in time
- Verify the URL is correct
- Check if the server is temporarily down
- Try accessing the URL manually

3. **Connection Failed**: Unable to reach the server
- Verify the domain exists
- Check if the repository/file was deleted

### How to Fix:

1. **For model URLs in \`properties.models[].url\`:**
- Update the URL to a valid download link
- Ensure the model file is still available
- Test the URL manually before committing

2. **For links in MarkdownNote/Note widgets:**
- Update or remove broken documentation links
- Ensure all referenced resources are accessible

### Testing Links Locally:

\`\`\`bash
# Extract and check links
python3 scripts/check_links.py extract
lychee links_to_check.txt

# View detailed report
python3 scripts/check_links.py report

# View excluded links
python3 scripts/check_links.py report-excluded
\`\`\`

### 📦 Detailed Reports

For a complete list of all links and their sources, download the artifacts from this workflow run:
- \`link_report_detailed.txt\` - Full detailed report showing all links and which files contain them
- \`excluded_links.txt\` - Complete list of excluded links
- \`lychee-report.md\` - Full lychee check report

**Note**: All links in workflow files must be valid and accessible before merging to ensure users can download required models and access documentation.`;
${excludedReport ? '**Excluded:**\n' + excludedReport + '\n\n' : ''}
**Fix:** Update or remove broken URLs in workflow files. Check artifacts for full report.`;

github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sync-custom-nodes.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Sync Custom Nodes Requirements

# ⚠️ TEMPORARILY DISABLED - Remove the `if: false` condition below to re-enable
# This workflow automatically syncs requiresCustomNodes field in all index files
# when templates are changed in PRs.
#
#
# Process:
# 1. Scans all template JSON files (excluding index files) for cnr_id values
# 2. Extracts all non-comfy-core cnr_ids for each template
Expand Down
69 changes: 48 additions & 21 deletions .github/workflows/validate-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,37 @@ jobs:
pip install jsonschema

- name: Run validation script
run: python scripts/validate_templates.py

id: validation
run: |
python scripts/validate_templates.py 2>&1 | tee validation_output.txt
echo "exit_code=${PIPESTATUS[0]}" >> $GITHUB_OUTPUT
continue-on-error: true

- name: Comment on PR with validation errors
if: steps.validation.outputs.exit_code != '0' && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
let output = '';
try {
output = fs.readFileSync('validation_output.txt', 'utf8');
} catch (error) {
output = 'Unable to read validation output';
}

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## ❌ Template Validation Failed

\`\`\`
${output}
\`\`\``
});

- name: Check JSON syntax
run: |
echo "Checking JSON syntax..."
Expand Down Expand Up @@ -94,28 +123,26 @@ jobs:
report = 'Unable to read thumbnail validation report';
}

const comment = `## ❌ Thumbnail Validation Issues Found

Your template has thumbnail configuration issues that need to be resolved.

**Why this matters:** Templates need proper thumbnails to provide users with visual previews. Templates with special thumbnail variants like "compareSlider" or "hoverDissolve" require specific thumbnail files to work correctly.

### Validation Report:
\`\`\`
${report}
\`\`\`

### How to Fix:
1. **Missing thumbnails**: Ensure each template has at least one thumbnail file (e.g., \`template-1.webp\`)
2. **Incomplete dual thumbnails**: Templates with \`thumbnailVariant: "compareSlider"\` or \`"hoverDissolve"\` need both \`-1\` and \`-2\` thumbnail files
3. **Check file naming**: Thumbnail files should be named \`{template_name}-{number}.{extension}\`
4. **Verify file format**: Use the correct file extension (\`.webp\`, \`.mp3\`, etc.) as specified in the template's \`mediaSubtype\`

**Note**: All templates must have proper thumbnails configured to ensure the best user experience when browsing templates.`;
const comment = `## ❌ Thumbnail Validation Failed

\`\`\`
${report}
\`\`\`

**Fix:**
- Missing: Add \`template-1.webp\`
- Dual thumbnails (\`compareSlider\`/\`hoverDissolve\`): Need both \`-1\` and \`-2\` files
- Check naming: \`{name}-{number}.{ext}\``;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
});

- name: Fail workflow if validation failed
if: steps.validation.outputs.exit_code != '0' || steps.thumbnail_check.outputs.thumbnail_issues == 'true'
run: |
echo "❌ Validation failed"
exit 1
44 changes: 41 additions & 3 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,52 @@ jobs:
python-version: "3.x"

- name: Sync manifests and bundles (first)
id: sync_bundles
run: |
echo "=== Validating bundles.json and syncing manifests ==="
# This step validates that all templates are assigned to bundles
# and generates updated manifest files with SHA256 hashes
# Must run BEFORE version detection so core package manifest.json changes are detected
python scripts/sync_bundles.py
echo "✅ Manifest sync complete"

python scripts/sync_bundles.py 2>&1 | tee sync_bundles_output.txt
echo "exit_code=${PIPESTATUS[0]}" >> $GITHUB_OUTPUT
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
echo "✅ Manifest sync complete"
fi
continue-on-error: true

- name: Comment on PR with sync errors
if: steps.sync_bundles.outputs.exit_code != '0' && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
let output = '';
try {
output = fs.readFileSync('sync_bundles_output.txt', 'utf8');
} catch (error) {
output = 'Unable to read sync bundles output';
}

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## ❌ Bundle Sync Failed

\`\`\`
${output}
\`\`\`

**Fix:** Ensure all templates are assigned to bundles in \`bundles.json\`.`
});

- name: Fail workflow if sync failed
if: steps.sync_bundles.outputs.exit_code != '0'
run: |
echo "❌ Bundle sync failed"
exit 1

- name: Auto-bump package versions if needed
run: |
echo "=== Analyzing template changes and bumping versions ==="
Expand Down
2 changes: 2 additions & 0 deletions bundles.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@
"wan2.1_fun_inp"
],
"media-video": [
"video_ltx2_t2v_distilled",
"video_ltx2_i2v_distilled",
"video_ltx2_t2v",
"video_ltx2_pose_to_video",
"video_ltx2_i2v",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "comfyui-workflow-templates-core"
version = "0.3.76"
version = "0.3.77"
description = "Core helpers for ComfyUI workflow templates"
readme = {text = "Core helpers for ComfyUI workflow templates.", content-type = "text/plain"}
requires-python = ">=3.9"
Expand Down
Loading