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.
|
🤖 PR Triage
Rationale: DRAFT with 0 changed files detected — likely incomplete or superseded by PR #45045. No CI, no reviews. Defer until author confirms readiness or closes.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR #45044 has 0 additions and 0 deletions — only an 'Initial plan' commit with no code changes. There is no diff to review at this time. |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (0 additions detected). |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ PR #45044 has only an 'Initial plan' commit with no file changes — the implementation described in the PR body has not been committed yet. There is no diff to review. |
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. |
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