Fix update-mslearn-dates action error + unit test failure #2021
Merged
Fix update-mslearn-dates action error + unit test failure #2021
Conversation
- Change sed delimiter from / to | so date slashes (MM/DD/YYYY) don't break the substitution - Update test regex to accept both / and | sed delimiters - Update test regex to accept optional -u flag on git add Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the update-mslearn-dates GitHub Action so its sed replacement works with MM/DD/YYYY dates (which include /), and updates the PowerShell unit tests to validate the new sed delimiter and git add invocation.
Changes:
- Switch
seddelimiter from/to|in the workflow to avoid conflicts with slash-containing dates. - Relax Pester assertions to accept either
/or|delimiters and an optional-uflag forgit add.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/update-mslearn-dates.yml |
Updates the sed command to use ` |
src/powershell/Tests/Unit/Action.UpdateMsLearnDates.Tests.ps1 |
Updates unit test regex assertions to match the new delimiter and git add form. |
Trigger update-mslearn-dates action to verify sed fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RolandKrummenacher
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🛠️ Description
The
update-mslearn-datesGitHub Action fails when processing markdown files because thesedcommand uses/as a delimiter, which conflicts with theMM/DD/YYYYdate format. For example,sed -i "s/^ms\.date:.*$/ms.date: 02/23/2026/"breaks because the slashes in the date create extra delimiters.Changes the sed delimiter from
/to|and updates unit test assertions to match.📋 Checklist
🔬 How did you test this change?
🙋♀️ Do any of the following that apply?
📑 Did you update
docs/changelog.md?📖 Did you update documentation?
🤖 Generated with Claude Code