Skip to content

Add Parse-ChangelogContent and Set-ChangeLogEntryContent to common scripts#13097

Merged
weshaggard merged 6 commits intomainfrom
copilot/promote-common-logics-changelog
Dec 2, 2025
Merged

Add Parse-ChangelogContent and Set-ChangeLogEntryContent to common scripts#13097
weshaggard merged 6 commits intomainfrom
copilot/promote-common-logics-changelog

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 1, 2025

Promotes changelog parsing logic from Java SDK's Changelog-Helpers.ps1 to shared common scripts per discussion in Azure/azure-sdk-for-java#47079.

Changes

  • Parse-ChangelogContent: Parses raw changelog text into structured ReleaseContent array and Sections hashtable
  • Set-ChangeLogEntryContent: Updates a changelog entry with parsed content from new text
  • Get-SectionHeaderRegex: Shared helper function for building section header regex patterns, used by Get-ChangeLogEntriesFromContent, Parse-ChangelogContent, and Remove-EmptySections
  • Pester tests: 12 tests covering unit and integration scenarios

Local run the pester tests, all passed:

Usage

$entries = Get-ChangeLogEntries -ChangeLogLocation "CHANGELOG.md"
$entry = $entries["1.0.0"]

# Update entry with generated changelog text
Set-ChangeLogEntryContent -ChangeLogEntry $entry `
    -NewContent "### Features Added`n`n- New feature" `
    -InitialAtxHeader $entries.InitialAtxHeader

Set-ChangeLogContent -ChangeLogLocation "CHANGELOG.md" -ChangeLogEntries $entries

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.

Copilot AI and others added 2 commits December 1, 2025 07:38
… 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>
Copilot AI changed the title [WIP] Promote common logics for updating CHANGELOG.md Add New-ChangelogContent and Set-ChangeLogEntryContent to common scripts Dec 1, 2025
@haolingdong-msft haolingdong-msft marked this pull request as ready for review December 1, 2025 08:16
@haolingdong-msft haolingdong-msft requested a review from a team as a code owner December 1, 2025 08:16
Copilot AI review requested due to automatic review settings December 1, 2025 08:16
@haolingdong-msft
Copy link
Copy Markdown
Member

Local run the pester tests, all passed:
image

Copy link
Copy Markdown
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

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-ChangelogContent function to parse raw changelog text into structured content (ReleaseContent array and Sections hashtable)
  • Added Set-ChangeLogEntryContent function 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>
Copilot AI changed the title Add New-ChangelogContent and Set-ChangeLogEntryContent to common scripts Add Parse-ChangelogContent and Set-ChangeLogEntryContent to common scripts Dec 1, 2025
Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
@weshaggard
Copy link
Copy Markdown
Member

/azp run azure-sdk-tools - sync - eng-common

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Copy Markdown
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Dec 1, 2025
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>
azure-sdk added a commit to Azure/azure-sdk-for-rust that referenced this pull request Dec 1, 2025
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>
@weshaggard weshaggard merged commit c566f97 into main Dec 2, 2025
10 checks passed
@weshaggard weshaggard deleted the copilot/promote-common-logics-changelog branch December 2, 2025 00:00
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.

Changelog operations, promote common logics from Java's implemeted scripts to Engsys common scripts

5 participants