mirror of
https://github.com/Comfy-Org/Comfy-PR.git
synced 2026-11-04 23:37:33 +00:00
[PR #202] fix(gh-design): skip self-review requests and tolerate 422 errors #203
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/Comfy-PR#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/202
Author: @snomiao
Created: 4/22/2026
Status: 🔄 Open
Base:
main← Head:fix/gh-design-self-review📝 Commits (10+)
2004175fix(gh-design): skip self-review requests and tolerate 422 errors4cf8723Update app/tasks/gh-design/gh-design.ts2c8cfd9Merge branch 'fix/gh-design-self-review' of https://github.com/Comfy-Org/Comfy-PR into fix/gh-design-self-review33e8f70fix(gh-design): skip self-review requests and tolerate 422 errors7472a00Update app/tasks/gh-design/gh-design.tsd5a2921fix(gh-design): address review comments — typed catch, filter author from persisted reviewersf97f018test(gh-design): add filterReviewers unit testscee9996refactor(gh-design): extract filterReviewers to side-effect-free module, fix guard condition7ab8d77fix(gh-design): resolve merge conflict — adopt filterReviewers helper0cc2d8ffix(gh-design): only persist reviewers on successful API call📊 Changes
3 files changed (+100 additions, -15 deletions)
View changed files
➕
app/tasks/gh-design/filterReviewers.spec.ts(+51 -0)➕
app/tasks/gh-design/filterReviewers.ts(+17 -0)📝
app/tasks/gh-design/gh-design.ts(+32 -15)📄 Description
Summary
The 5-minute
Combined GitHub Tasksworkflow has been failing every run. Root cause:REQUEST_REVIEWERSis hardcoded to["PabloWiedemann"]inapp/tasks/gh-design/gh-design.ts. When Pablo opens a PR himself, the task callsgh.pulls.requestReviewerswith him as the reviewer, GitHub responds 422 Review cannot be requested from pull request author, andrun-gh-tasks.tsthen exits non-zero — turning one avoidable PR-level error into a full workflow failure on every 5-minute tick.Fix
task.user) out of the reviewer list before calling the API (case-insensitive comparison).status === 422(non-collaborators, etc.), rethrowing anything else. 422s are retried on subsequent runs since the condition may be transient.newReviewerslist, so when all eligible reviewers are already requested, the block is skipped entirely.filterReviewers()into a side-effect-free module with 8 unit tests covering author filtering, case insensitivity, and edge cases.Test plan
run_comfy_prandrun_combined_github_taskspassfilterReviewers.spec.ts— 8 tests passingCombined GitHub Tasksrun finishes green.REQUEST_REVIEWERSmember skip the call silently.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.