Fix ephemeral issue search to support legacy expiration format #13291
+50
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The agentic maintenance job (
agentics-maintenance.yml) runs every 2 hours to close expired issues, discussions, and PRs. Issues created with the legacy expiration format were not being detected and closed.Root Cause
searchEntitiesWithExpirationonly checked for the new format with HTML comment:> - [x] expires <!-- gh-aw-expires: 2026-01-31T06:04:00.000Z --> on Jan 31, 2026, 6:04 AM UTCIssues created with the legacy format were missed:
> - [x] expires on Jan 31, 2026, 6:04 AM UTCWhile
extractExpirationDate(used to parse dates) supports both formats, the search filter only usedEXPIRATION_PATTERN.Changes
expired_entity_search_helpers.cjsEXPIRATION_PATTERNandLEGACY_EXPIRATION_PATTERNexpired_entity_search_helpers.test.cjsThe search now finds both format variants, ensuring all expired ephemeral issues/discussions/PRs are closed regardless of creation date.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.