Repository navigation
fix(cut-release): enumerate merged PRs, not only squash titles - #4668
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
Daniel Meppiel (danielmeppiel) merged 1 commit into
Conversation
list-changes-since-tag.sh read only squash-merge '(#N)' subjects, but main lands PRs as merge commits, so most PRs since a tag were missed. Enumerate with gh pr list --state merged and keep PRs whose merge commit is in <tag>..HEAD. Without gh, warn and parse both 'Merge pull request #N' and '(#N)' first-parent subjects. Add an offline --self-test. Output schema and exit codes are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 18:38
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The release-change script can silently return incomplete PR lists, abort its fallback on unmatched commits, and run self-test Git operations in the caller’s repository if temporary-directory setup fails.
3 open issues
What changed in this PR
Updates cut-release PR discovery to include merge commits, addressing #4667 and reducing manual work when preparing release notes.
Changes:
- Uses
gh pr listwith ancestry filtering, plus a first-parent Git-log fallback. - Adds offline metadata recovery and a parser self-test; removes the Bash 4 associative-array dependency.
- Updates skill documentation, synchronizes deployed copies, and refreshes lockfile hashes.
| File | Description |
|---|---|
apm.lock.yaml |
Updates hashes for the deployed skill and script. |
.apm/skills/cut-release/SKILL.md |
Documents enumeration, fallback behavior, and the self-test. |
.apm/skills/cut-release/scripts/list-changes-since-tag.sh |
Implements merged-PR discovery, metadata fallback, and self-testing. |
.agents/skills/cut-release/SKILL.md |
Mirrors the updated skill documentation. |
.agents/skills/cut-release/scripts/list-changes-since-tag.sh |
Mirrors the release-enumeration script changes. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-fix-cut-release-change-list
branch
November 21, 2026 18:51
5 of 14 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…iew-followups fix(cut-release): follow-ups from #4668 review
Mohit Mishra (mohitmishra786)
pushed a commit
to mohitmishra786/apm
that referenced
this pull request
Nov 22, 2026
…r cd fails run_self_test is called as 'run_self_test || exit 1', which disables errexit inside it, so a failed mktemp or cd let git init/commit/checkout run in the caller's real repository. Stop explicitly on either failure and assert the cwd is the temp dir before git init (microsoft#4668 review). Refs microsoft#4667 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merged
3 of 10 tasks
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.


Description
scripts/list-changes-since-tag.sh(cut-release skill) read only squash-merge(#N)subjects with--no-merges.mainlands PRs as merge commits (Merge pull request #N from ...), so it missed most PRs and picked up issue numbers cited in branch commits. The v0.38.0 draft (#4640) had to be built by hand.Changes:
gh pr list --state merged --base main --search "merged:>=<tag commit date>" --limit 500, then keep only PRs whose merge commit is reachable from HEAD and not from the tag (git merge-base --is-ancestor), so the window is exact.[!]warning on stderr, then parse BOTHMerge pull request #Nand squash(#N)subjects from first-parentgit log <tag>..HEAD. Ifgh pr viewfails for a PR, details come from the commit (title, author, changed paths) instead of dropping the PR.--self-test: builds a throwaway repo (tag, squash(#11),Merge pull request #12 from x/y, plus a pre-tag(#10)and a branch-only(#99)as negatives) and asserts the git-log parser finds exactly 11 and 12. Offline, no gh. Documented in--helpand SKILL.md./bin/bash3.2..agents/skills/cut-release/mirror hand-synced byte-identically;apm.lock.yamlcontent hashes updated (APM Self-Check audits drift).Before / after (main at 96a3ec5, since v0.37.0):
Issue and approved scope
Issue: Fixes #4667
Human scope-approval comment: requested by the release manager to unblock the 0.38.0 cut; approval to be recorded on #4667 by a maintainer.
Does this PR complete the issue, or what remains? Completes it.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
bash .apm/skills/cut-release/scripts/list-changes-since-tag.sh --self-test-> passed ([+] self-test passed: found PRs 11 12), also under macOS/bin/bash3.2.Same self-test with the merge regex broken -> fails (
[x] self-test: PR #12 not found), exit 1.shellcheck .apm/skills/cut-release/scripts/list-changes-since-tag.sh-> clean.Real run after
git fetch --tags-> 48 PRs, exit 0;--bogus-> exit 2.No Python touched; full pytest not run (no tests reference this script).
Changelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.