Skip to content

Comments

Fix update-mslearn-dates action error + unit test failure #2021

Merged
flanakin merged 3 commits intodevfrom
flanakin/fix-mslearn-dates-action
Feb 23, 2026
Merged

Fix update-mslearn-dates action error + unit test failure #2021
flanakin merged 3 commits intodevfrom
flanakin/fix-mslearn-dates-action

Conversation

@flanakin
Copy link
Collaborator

@flanakin flanakin commented Feb 23, 2026

🛠️ Description

The update-mslearn-dates GitHub Action fails when processing markdown files because the sed command uses / as a delimiter, which conflicts with the MM/DD/YYYY date 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?

  • 🤏 Lint tests
  • 🤞 PS -WhatIf / az validate
  • 👍 Manually deployed + verified
  • 💪 Unit tests
  • 🙌 Integration tests

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ✅ Updated changelog (required for dev PRs)
  • ➡️ Will add log in a future PR (feature branch PRs only)
  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Public docs in docs (required for dev)
  • ✅ Public docs in docs-mslearn (required for dev)
  • ✅ Internal dev docs in docs-wiki (required for dev)
  • ✅ Internal dev docs in src (required for dev)
  • ➡️ Will add docs in a future PR (feature branch PRs only)
  • ❎ Docs not needed (small/internal change)

🤖 Generated with Claude Code

- 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>
Copilot AI review requested due to automatic review settings February 23, 2026 10:15
@flanakin flanakin requested a review from MSBrett as a code owner February 23, 2026 10:15
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Review 👀 PR that is ready to be reviewed label Feb 23, 2026
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

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 sed delimiter from / to | in the workflow to avoid conflicts with slash-containing dates.
  • Relax Pester assertions to accept either / or | delimiters and an optional -u flag for git 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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Micro PR 🔬 Very small PR that should be especially easy for newcomers label Feb 23, 2026
flanakin and others added 2 commits February 23, 2026 02:25
Trigger update-mslearn-dates action to verify sed fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@flanakin flanakin changed the title Fix update-mslearn-dates action sed delimiter Fix update-mslearn-dates action bug Feb 23, 2026
@flanakin flanakin enabled auto-merge (squash) February 23, 2026 10:29
@flanakin flanakin added Hotfix 🔥 A change that should be deployed immediately and removed Hotfix 🔥 A change that should be deployed immediately labels Feb 23, 2026
@flanakin flanakin changed the title Fix update-mslearn-dates action bug Fix update-mslearn-dates action error + unit test failure Feb 23, 2026
@flanakin flanakin merged commit e84efa2 into dev Feb 23, 2026
4 checks passed
@flanakin flanakin deleted the flanakin/fix-mslearn-dates-action branch February 23, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants