Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 17, 2025

Overview

This PR implements automated workflow documentation generation and standardization as requested in issue #5987. All 25 GitHub Actions workflows now have consistent metadata, and documentation is automatically generated and kept in sync via CI.

Problem

The repository had grown to 25 workflows with inconsistent documentation:

  • 11 workflows were missing description fields
  • No centralized documentation of label-triggered workflows
  • Manual documentation easily became outdated
  • Difficult to discover available workflows and their triggers

Solution

1. Standardized All Workflows

Added description fields to all workflows following a consistent pattern:

name: "PR: Claude Review"
description: "AI-powered code review triggered by adding the 'claude-review' label to a PR"

2. Created Automation Script

scripts/cicd/generate-workflow-docs.ts - A TypeScript script that:

  • Scans all workflow files in .github/workflows/
  • Extracts metadata: name, description, triggers, and label triggers
  • Detects multiple label trigger patterns:
    • github.event.label.name == 'label-name'
    • contains(github.event.pull_request.labels.*.name, 'label-name')
    • label_trigger: "label-name" (for Claude action)
    • startsWith(github.event.comment.body, '/command')
  • Groups workflows by prefix (ci-, pr-, release-, api-, i18n-, etc.)
  • Generates comprehensive documentation

Usage: pnpm workflow:docs

3. Auto-Generated Documentation

.github/workflows/README.md now includes:

  • Warning banner that content is auto-generated
  • Category prefix table showing workflow organization
  • Quick Reference section listing all label-triggered workflows:
    • needs-backport - Automatically backports merged PRs
    • claude-review - AI-powered code review
    • New Browser Test Expectations - Update Playwright snapshots
    • Release - Triggers 3 release-related workflows
  • Detailed listings for each workflow with triggers and descriptions
  • Maintenance guidelines and best practices

4. CI Validation

ci-workflow-docs.yaml ensures documentation stays current:

  • Triggers on changes to workflow files or the generation script
  • Regenerates documentation
  • Fails if documentation is out of sync
  • Provides clear diff showing what needs updating

Benefits

  1. Discoverability: Developers can easily find and understand available workflows
  2. Consistency: All workflows follow the same documentation pattern
  3. Automation: Documentation automatically stays in sync with code changes
  4. Developer Experience: Clear instructions for using label-triggered workflows
  5. Maintainability: CI prevents outdated documentation from being merged

Label-Triggered Workflows Detected

The automation successfully identified and documented these label triggers:

  • needs-backport - PR Backport workflow
  • claude-review - Claude AI code review
  • New Browser Test Expectations - Playwright snapshot updates
  • Release - Release branch creation, draft creation, and desktop UI publishing

Testing

  • ✅ Verified script extracts all workflow metadata correctly
  • ✅ Tested all label detection patterns work
  • ✅ Confirmed documentation generates without errors
  • ✅ Validated CI check properly detects out-of-sync docs
  • ✅ All code passes linting and type checking

Usage for Maintainers

When adding or modifying workflows:

  1. Include both name and description fields
  2. Run pnpm workflow:docs to regenerate documentation
  3. Commit both the workflow and updated README
  4. CI will validate documentation is current

Fixes #5987

Original prompt

This section details on the original issue you should resolve

<issue_title>CI: Standardize the triggering + Docs Update</issue_title>
<issue_description>It'd be really cool if we had a way to

  • standardize the triggering
  • extract the label and description from the workflow
  • Keep the doc updated

Not now, but in a wonderful sci-fi future

Originally posted by @DrJKL in #5891 (comment)

┆Issue is synchronized with this Notion page by Unito
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #5987


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

┆Issue is synchronized with this Notion page by Unito

Copilot AI and others added 3 commits October 17, 2025 01:08
- Add detection for needs-backport and Release labels
- Deduplicate label triggers in Quick Reference section
- Generate Quick Reference dynamically from workflows
- Show all label-triggered workflows with descriptions

Co-authored-by: snomiao <[email protected]>
- Extract duplicate label checking into addUniqueLabel helper
- Improve comments explaining trigger filtering logic
- Clarify which triggers are shown in Quick Reference vs detailed sections

Co-authored-by: snomiao <[email protected]>
@Copilot Copilot AI changed the title [WIP] Standardize triggering process and update documentation CI: Standardize workflow triggering and add automated documentation generation Oct 17, 2025
Copilot finished work on behalf of snomiao October 17, 2025 01:19
@Copilot Copilot AI requested a review from snomiao October 17, 2025 01:19
…Comfy-Org/ComfyUI_frontend into copilot/standardize-triggering-and-docs
Copy link

github-actions bot commented Oct 17, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 10/19/2025, 02:55:57 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

Copy link

github-actions bot commented Oct 17, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 10/19/2025, 03:09:48 AM UTC

📈 Summary

  • Total Tests: 499
  • Passed: 466 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 31 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 457 / ❌ 0 / ⚠️ 2 / ⏭️ 31
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@snomiao
Copy link
Member

snomiao commented Oct 19, 2025

changed too many files

@snomiao snomiao closed this Oct 19, 2025
Copy link

Bundle Size Report

App Entry Points

Main application bundles

File Size Gzip Brotli
assets/index-CuLZTtAC.js 2.02 MB 381 kB 296 kB
assets/index-E0kYOj1H.js 9.67 MB 1.99 MB 1.43 MB
assets/index-PESgPnbc.js 507 B 292 B 249 B

Category Total: 11.7 MB

Core Views

Major application views and screens

File Size Gzip Brotli
assets/GraphView-BLQk4ujW.js 714 kB 139 kB 108 kB
assets/UserSelectView-Kp6GcnoT.js 7.99 kB 2.4 kB 2.09 kB

Category Total: 722 kB

UI Panels

Settings and configuration panels

File Size Gzip Brotli
assets/AboutPanel-Bq9ApgWv.js 10.1 kB 2.59 kB 2.27 kB
assets/CreditsPanel-CVBAywTM.js 21.9 kB 5.21 kB 4.54 kB
assets/ExtensionPanel-DFmOwtDV.js 11.9 kB 2.75 kB 2.4 kB
assets/KeybindingPanel-IQI7hKov.js 15.1 kB 3.68 kB 3.24 kB
assets/ServerConfigPanel-D2PD5OIf.js 8.04 kB 2.09 kB 1.83 kB
assets/UserPanel-D0nz-wnp.js 7.76 kB 1.98 kB 1.72 kB

Category Total: 74.8 kB

Services

Business logic and services

File Size Gzip Brotli
assets/keybindingService-Cnd76Vc_.js 7.21 kB 1.75 kB 1.5 kB
assets/serverConfigStore-CB-AA3JS.js 2.79 kB 890 B 779 B

Category Total: 10 kB

Utilities

Helper functions and utilities

File Size Gzip Brotli
assets/mathUtil-CTARWQ-l.js 1.07 kB 525 B 452 B

Category Total: 1.07 kB

Other

Uncategorized bundles

File Size Gzip Brotli
assets/UserAvatar.vue_vue_type_script_setup_true_lang-C9bSkTC5.js 1.12 kB 577 B 494 B

Category Total: 1.12 kB


Overall Total Size: 12.5 MB
Total Bundle Count: 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Standardize the triggering + Docs Update

2 participants