[PR #131] [MERGED] fix: revalidate PR state in coreping to handle closed PRs #129

Closed
opened 2026-10-27 21:09:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/131
Author: @snomiao
Created: 1/5/2026
Status: ✅ Merged
Merged: 1/5/2026
Merged by: @snomiao

Base: main ← Head: sno-fix-coreping-cache


📝 Commits (1)

  • 2d8f338 fix: revalidate PR state in coreping to handle closed PRs

📊 Changes

1 file changed (+18 additions, -6 deletions)

View changed files

📝 app/tasks/coreping/coreping.ts (+18 -6)

📄 Description

Summary

  • Fixes coreping task to revalidate PR state before including in remaining open PRs list
  • Prevents closed PRs from appearing due to stale database state
  • Uses cached GitHub client (ghc) for efficient API calls with automatic caching
  • Updates database when PR state changes are detected

Changes

  • Added async filter to revalidate PR state using ghc.pulls.get
  • Update database when PR state differs from cached state
  • Filter out non-open PRs from remaining list
  • Minor formatting cleanup

Test plan

  • Run coreping task and verify closed PRs are filtered out
  • Verify database state is updated when PRs are closed
  • Confirm cached GitHub client reduces API calls

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/131 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@snomiao](https://github.com/snomiao) **Base:** `main` ← **Head:** `sno-fix-coreping-cache` --- ### 📝 Commits (1) - [`2d8f338`](https://github.com/Comfy-Org/Comfy-PR/commit/2d8f33850b8a26cb4a39f2875b6b90ad740decb6) fix: revalidate PR state in coreping to handle closed PRs ### 📊 Changes **1 file changed** (+18 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `app/tasks/coreping/coreping.ts` (+18 -6) </details> ### 📄 Description ## Summary - Fixes coreping task to revalidate PR state before including in remaining open PRs list - Prevents closed PRs from appearing due to stale database state - Uses cached GitHub client (ghc) for efficient API calls with automatic caching - Updates database when PR state changes are detected ## Changes - Added async filter to revalidate PR state using `ghc.pulls.get` - Update database when PR state differs from cached state - Filter out non-open PRs from remaining list - Minor formatting cleanup ## Test plan - [x] Run coreping task and verify closed PRs are filtered out - [x] Verify database state is updated when PRs are closed - [x] Confirm cached GitHub client reduces API calls 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#129
No description provided.