Add Parse-ChangelogContent and Set-ChangeLogEntryContent to common scripts#13097
Add Parse-ChangelogContent and Set-ChangeLogEntryContent to common scripts#13097weshaggard merged 6 commits intomainfrom
Conversation
… tests Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com>
Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR promotes changelog parsing logic from the Java SDK to shared common scripts, introducing two new functions to programmatically update changelog entries while maintaining structure.
Purpose: Enable SDK automation tools across different language repositories to programmatically update changelogs with generated content.
Key Changes:
- Added
New-ChangelogContentfunction to parse raw changelog text into structured content (ReleaseContent array and Sections hashtable) - Added
Set-ChangeLogEntryContentfunction to update changelog entries with new parsed content - Comprehensive Pester test suite with 12 tests covering unit and integration scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/common/scripts/ChangeLog-Operations.ps1 | Adds two new helper functions (New-ChangelogContent and Set-ChangeLogEntryContent) for parsing and updating changelog entries programmatically |
| eng/common-tests/ChangeLog-Operations.Tests.ps1 | Introduces comprehensive Pester tests (12 tests total) covering unit tests for both new functions and integration tests for the complete update workflow |
Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
|
/azp run azure-sdk-tools - sync - eng-common |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#13097 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com> Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#13097 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: haolingdong-msft <87355844+haolingdong-msft@users.noreply.github.com> Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>

Promotes changelog parsing logic from Java SDK's
Changelog-Helpers.ps1to shared common scripts per discussion in Azure/azure-sdk-for-java#47079.Changes
Parse-ChangelogContent: Parses raw changelog text into structuredReleaseContentarray andSectionshashtableSet-ChangeLogEntryContent: Updates a changelog entry with parsed content from new textGet-SectionHeaderRegex: Shared helper function for building section header regex patterns, used byGet-ChangeLogEntriesFromContent,Parse-ChangelogContent, andRemove-EmptySectionsLocal run the pester tests, all passed:

Usage
These functions enable SDK automation tools to programmatically update changelogs with generated content while maintaining proper structure.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.