Refactor expired entity close/comment flow for issues, PRs, and discussions#45044
Conversation
🤖 PR Triage
Rationale: Draft, 0 changes shown. Likely empty or early WIP. Defer until undrafted with real content. Triage run §29183606049
|
|
Hey This PR is currently a draft with no file changes (the only commit is "Initial plan"). A few things to address before it's ready for review:
If you'd like a hand finishing this up, here's a ready-to-use prompt:
|
🤖 PR Triage
Draft with 0 additions/deletions — appears empty or in-progress. Defer until work is complete.
|
The expiration cleanup actions for issues, pull requests, and discussions each reimplemented the same close/comment/message flow, creating drift risk for future behavior updates. This change centralizes that flow while preserving each entity’s API-specific behavior and discussion-specific dedupe semantics.
Shared expired-entity close flow
actions/setup/js/expired_entity_close_flow.cjswithcloseExpiredEntityWithComment(...).{ status, record }return shapeIssue + PR handlers migrated to helper
actions/setup/js/close_expired_issues.cjsactions/setup/js/close_expired_pull_requests.cjsaddComment,closeEntity, noun/success text).Discussion handler migrated with existing guards intact
actions/setup/js/close_expired_discussions.cjs.<!-- gh-aw-closed -->)Example of the new call pattern