Add shared changelog extractor and fix integrity regex - #3090
Draft
jekloudaMSFT wants to merge 1 commit into
Draft
Add shared changelog extractor and fix integrity regex#3090jekloudaMSFT wants to merge 1 commit into
jekloudaMSFT wants to merge 1 commit into
Conversation
Extract the changelog-section logic into tools/cli/extract-changelog-section.js with exact version-header matching (fixes a latent startsWith bug where 2.53.1 matched 2.53.10) and refactor readChangelog.js to reuse it. Also make the preRelease.js integrity replacement global so every integrity attribute is updated, not just the first. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57d4bec2-3b60-423f-8ca2-34bc2da0d3c3
There was a problem hiding this comment.
Pull request overview
Adds a reusable changelog-section extraction utility to support upcoming release-pipeline automation work, refactors the existing readChangelog CLI to use it, and fixes a latent integrity-attribute replacement bug in pre-release tooling.
Changes:
- Introduce
tools/cli/extract-changelog-section.jsto extract a specific## <version>section from the TeamsJS changelog without prefix-collision. - Refactor
tools/cli/readChangelog.jsto delegate to the shared extractor. - Update
tools/cli/preRelease.jsto replace allintegrity="..."occurrences (global regex) instead of only the first.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/cli/readChangelog.js | Delegates changelog section output to the shared extractor module. |
| tools/cli/preRelease.js | Fixes integrity-attribute replacement to update every occurrence in a file. |
| tools/cli/extract-changelog-section.js | New shared module/CLI for extracting changelog sections by exact version header. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (index === -1) { | ||
| throw new Error(`Matching version ${version} in changelog was not found`); | ||
| } | ||
| return parts[index + 1] ? parts[index + 1].trim() : ''; |
Contributor
size-limit report 📦
|
jekloudaMSFT
marked this pull request as draft
July 16, 2026 23:25
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.
For more information about how to contribute to this repo, visit this page.
Description
This is the first of four stacked PRs that streamline the TeamsJS release pipeline by automating the current manual release checklist and GitHub Release creation. This foundational PR contains no workflow/behavior changes — it extracts shared logic and fixes two latent bugs, so the later PRs (validation library, validate workflow, orchestrate workflow) can build on it.
Main changes in the PR:
Validation
Validation performed:
Unit Tests added:
No — the unit tests that cover this module (extract-changelog-section , including the prefix-collision and missing-version cases) live in stacked PR 2, which registers tools/cli as a workspace package and adds the Jest harness. Splitting them out keeps this PR to a minimal, low-risk refactor. The tests fully exercise the code introduced here.
End-to-end tests added:
No — no runtime/product behavior changes; these are release-tooling scripts.
Additional Requirements
Change file added:
No — changes are limited to repo release tooling under tools/cli/ and produce no @microsoft/teams-js package changes, so no beachball change file is required.
Related PRs:
Part of a stacked series:
• PR 1 (this) — shared changelog extractor + bug fixes
• PR 2 — validation scripts + Jest tests
• PR 3 — release-validate.yml workflow
• PR 4 — release-orchestrate.yml (auto pre-release)
Next/remaining steps:
• PR 2: release integrity + SRI validation library, with fixture-based unit tests
• PR 3: PR validation workflow (back required status checks on release/* )
• PR 4: automate GitHub pre-release creation on release-PR merge