Comfy-Org / Comfy-Org/ComfyUI_frontend

ci: refactor post_comment() into write_section_file + post_pr_comment and remove dead gh-api branch

Open
#12,933 1 comment 1 reaction 1 assignee Claimed by @christian-byrne View on GitHub
area:CI/CD
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Background

In PR #11935, the `post_comment()` function in both Playwright and Storybook CI deploy scripts was updated to support a dual mode: when `SUMMARY_FILE` is set (the unified-comment path used by all CI workflows), it writes markdown to a file and returns early; otherwise it falls back to the legacy `gh api`-based PR comment upsert.

This was flagged in review ([comment](https://github.com/Comfy-Org/ComfyUI_frontend/pull/11935#discussion_r3262748849)) and acknowledged by @christian-byrne as something to address in a follow-up PR.

## Tasks

- [ ] Rename / split `post_comment()` in `scripts/cicd/pr-playwright-deploy-and-comment.sh`:
- Extract a `write_section_file()` function for the `SUMMARY_FILE` path.
- Keep a `post_pr_comment()` (or similar) function for the legacy direct-comment path.
- Add a small dispatcher at each call site that selects the correct function.
- [ ] Do the same for `scripts/cicd/pr-storybook-deploy-and-comment.sh`.
- [ ] Consider removing the legacy `gh api`-based branch entirely, since it is dead code from CI (only reachable on manual local runs). If kept, document clearly that it is for local use only.

## References

- PR that introduced the dual-mode behavior: #11935
- Review comment that flagged the issue: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11935#discussion_r3262748849

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.