Skip to content

Fix expiration detection for quoted footers and legacy format#11036

Merged
pelikhan merged 2 commits intomainfrom
copilot/review-agentic-maintenance-code
Jan 21, 2026
Merged

Fix expiration detection for quoted footers and legacy format#11036
pelikhan merged 2 commits intomainfrom
copilot/review-agentic-maintenance-code

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Issue #10667 expired Jan 20 but wasn't closed by agentic-maintenance. The expiration pattern didn't match blockquote-prefixed lines (> - [x] expires...) and had no fallback for issues created before HTML comments were added.

Changes

  • Updated EXPIRATION_PATTERN to require blockquote prefix: /^>\s*-\s*\[x\]\s+expires\s*<!--\s*gh-aw-expires:\s*([^>]+)\s*-->/m
  • Added LEGACY_EXPIRATION_PATTERN to match old format without HTML comment: /^>\s*-\s*\[x\]\s+expires\s+on\s+(.+?)\s+UTC\s*$/m
  • Updated extractExpirationDate() to try new format first, fall back to legacy format parsing human-readable dates

Example

// New format (with ISO timestamp in HTML comment)
"> - [x] expires <!-- gh-aw-expires: 2026-01-20T09:20:00.000Z --> on Jan 20, 2026, 9:20 AM UTC"
// ✓ Matched by EXPIRATION_PATTERN, extracts ISO date

// Legacy format (issue #10667)
"> - [x] expires  on Jan 20, 2026, 9:20 AM UTC"
// ✓ Matched by LEGACY_EXPIRATION_PATTERN, parses human-readable date

Both formats now work. Next maintenance run will detect and close #10667.

Original prompt

review agentic-maintenance.yml code that expires issues. This issue should have expired and it should have been closed.

#10667


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Updated EXPIRATION_PATTERN to require blockquote prefix ("> ")
- Added LEGACY_EXPIRATION_PATTERN to match old format without HTML comment
- Updated extractExpirationDate to handle both new and legacy formats
- Added comprehensive tests for both patterns and formats
- Fixes issue #10667 detection - will now be closed by maintenance workflow

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review agentic-maintenance.yml for issue expiration Fix expiration detection for quoted footers and legacy format Jan 21, 2026
Copilot AI requested a review from pelikhan January 21, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[team-status] Daily Team Status - January 19, 2026 🌟

2 participants