Deduplicate closeOlder issue/PR wrapper wiring with a shared adapter#45045
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Rationale: Draft. Deduplicates closeOlder issue/PR wrapper wiring into shared adapter. Low risk, 4 files. Batch with other refactor/dedup PRs. Triage run §29183606049
|
|
Hey This PR looks well-structured: it's focused on a single concern, includes a dedicated test file (
|
🤖 PR Triage
Draft. Deduplication refactor with moderate size (+199/-42). Review together with the refactor-dedup batch.
|
closeOlderIssuesandcloseOlderPullRequestshad near-identical wrapper logic aroundcloseOlderEntities, creating duplicated adapter wiring and drift risk. This change centralizes the shared orchestration while preserving entity-specific behavior and output shape.Refactor: extract shared closeOlder adapter
actions/setup/js/close_older_adapter.cjswithcloseOlderWithAdapter(...)to handle:closeOlderEntities(...)config wiringcallerWorkflowId/closeOlderKeyinto search closures{ number, html_url }result mappingWrapper simplification: issues + pull requests
actions/setup/js/close_older_issues.cjsactions/setup/js/close_older_pull_requests.cjssearchOlder*, message mapping, comment/close handlers, labels), removing duplicated plumbing.Coverage for shared adapter behavior
actions/setup/js/close_older_adapter.test.cjsto validate:callerWorkflowId,closeOlderKey)getCloseMessagehtml_urlin mapped results