Skip to content

[release/v7.7.0-preview.1] Fix changelog grab failure when only one header exists.#27372

Merged
jshigetomi merged 1 commit intoPowerShell:release/v7.7.0-preview.1from
jshigetomi:backport/release/v7.7.0-preview.1/27371-d356e3f0e
Apr 28, 2026
Merged

[release/v7.7.0-preview.1] Fix changelog grab failure when only one header exists.#27372
jshigetomi merged 1 commit intoPowerShell:release/v7.7.0-preview.1from
jshigetomi:backport/release/v7.7.0-preview.1/27371-d356e3f0e

Conversation

@jshigetomi
Copy link
Copy Markdown
Collaborator

Backport of #27371 to release/v7.7.0-preview.1

Triggered by @jshigetomi on behalf of @jshigetomi

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Fixes changelog extraction in release pipeline to handle cases with only one release heading, unblocking the 7.7.0-preview.1 GitHub release.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified by original PR — logic correctly handles changelogs with only one release heading. N/A for automated tests (pipeline script change).

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Low risk — only modifies changelog extraction logic in release pipeline YAML; no runtime or customer-facing impact.

Copilot AI review requested due to automatic review settings April 28, 2026 17:22
@jshigetomi jshigetomi requested a review from a team as a code owner April 28, 2026 17:22
@jshigetomi jshigetomi added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 28, 2026
@jshigetomi jshigetomi merged commit 115541a into PowerShell:release/v7.7.0-preview.1 Apr 28, 2026
36 of 37 checks passed
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

Improves the robustness of changelog extraction in the GitHub/NuGet release pipeline so release notes generation works when the changelog contains only a single release heading.

Changes:

  • Ensure heading match results are always treated as an array and fail fast with a clear error when no headings are found.
  • Handle single-heading changelogs by extracting from the first heading through the end of the file (and fix the extracted line-count calculation).

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

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants