Skip to content

fix: update-agent-context timestamp regex to match template output#1836

Merged
mnriem merged 1 commit intogithub:mainfrom
mango766:fix/update-agent-context-timestamp-regex
Mar 13, 2026
Merged

fix: update-agent-context timestamp regex to match template output#1836
mnriem merged 1 commit intogithub:mainfrom
mango766:fix/update-agent-context-timestamp-regex

Conversation

@mango766
Copy link
Contributor

Updates the "Last updated" timestamp regex in both update-agent-context.sh and update-agent-context.ps1 to match the plain text format used by the template, in addition to the bold Markdown format.

The template outputs Last updated: [DATE] (plain text) but the scripts were only looking for **Last updated**: [DATE] (bold Markdown), so the timestamp was never refreshed on subsequent runs.

Fixes #1823
Closes #1834

The template outputs plain text `Last updated: [DATE]` but both
update-agent-context scripts only matched `**Last updated**: [DATE]`
(bold Markdown). Make the bold markers optional in the regex so the
timestamp is refreshed regardless of formatting.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the agent-context update scripts so they refresh the Last updated date in files generated from the current agent template, which uses a plain-text Last updated: YYYY-MM-DD format (not bold Markdown).

Changes:

  • PowerShell: broaden the Last updated line regex to match both Last updated: and **Last updated**:.
  • Bash: broaden the Last updated line regex to match both Last updated: and **Last updated**:.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/powershell/update-agent-context.ps1 Expands the timestamp detection regex so template-generated “Last updated:” lines are updated.
scripts/bash/update-agent-context.sh Expands the timestamp detection regex so template-generated “Last updated:” lines are updated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem mnriem merged commit c883952 into github:main Mar 13, 2026
12 checks passed
@mnriem
Copy link
Collaborator

mnriem commented Mar 13, 2026

@mango766 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants