Require next-major targets for breaking changes - #1972
Open
jar-stripe wants to merge 5 commits into
Open
jar-stripe wants to merge 5 commits into
jar-stripe wants to merge 5 commits into
Conversation
Committed-By-Agent: goose Orbit-Session-Id: c9e24cd7-9c07-436c-8756-f6998b381745
Committed-By-Agent: goose Orbit-Session-Id: c9e24cd7-9c07-436c-8756-f6998b381745
Committed-By-Agent: goose Orbit-Session-Id: c9e24cd7-9c07-436c-8756-f6998b381745
Committed-By-Agent: goose Orbit-Session-Id: c9e24cd7-9c07-436c-8756-f6998b381745
jar-stripe
marked this pull request as ready for review
September 18, 2026 20:32
jar-stripe
requested review from
xavdid
and
a lite review from Copilot
and removed request for
a team
September 18, 2026 20:32
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved workflow issues include an unpinned action, missed renamed changefiles, and an expanded squash-policy gate.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds CI enforcement requiring major Hark changes to target sdk-release/next-major.
Changes:
- Adds paginated changefile inspection and branch validation.
- Restricts workflow permissions and updates triggers.
- Adds a patch changefile documenting the behavior.
File summaries
| File | Description |
|---|---|
.hark/changes/2026-09-18_jar_require-next-major-target.change.md |
Documents the workflow behavior change. |
.github/workflows/rules.yml |
Implements changefile targeting checks and workflow updates. |
Review details
Suppressed comments (2)
.github/workflows/rules.yml:28
- This changes the existing rule for every auto-merge-enabled PR: non-
/merge-branches now default tosquashand will fail if they usemergeorrebase. The previous rule only constrained merge-script PRs, and the PR description does not call out a repository-wide squash requirement; please preserve the previous scope or explicitly establish this new policy before changing the gate.
expected_merge_method="squash"
# for merge PRs, expect "merge"
if [ ${{ contains(github.head_ref, '/merge-') }} == "true" ]; then
expected_merge_method="merge"
fi
.github/workflows/rules.yml:56
- This filter misses a changefile that is renamed into
.hark/changes/: GitHub reports that file withstatus: "renamed", so a major changefile at the new path can bypass the target-branch check. Treat renamed files as newly added (or otherwise inspect the final path) before runninghark inspect.
if ! paths=$(jq -sc '[.[] | select(.status == "added") | .filename | select(test("^[.]hark/changes/[^/]+[.]change[.]md$"))]' <<< "$files" 2>&1); then
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
zacchua-stripe
approved these changes
Sep 19, 2026
Comment on lines
+78
to
+82
| if [[ "$major_paths" != "[]" && "$BASE_REF" != "sdk-release/next-major" ]]; then | ||
| affected_paths=$(jq -r 'join(", ")' <<< "$major_paths") | ||
| echo "::error::Major Hark changefiles must target sdk-release/next-major. Retarget this pull request from '$BASE_REF' to 'sdk-release/next-major'. Affected files: $affected_paths" | ||
| exit 1 | ||
| fi |
Contributor
There was a problem hiding this comment.
Same question as stripe/stripe-dotnet#3456 (comment) !
Committed-By-Agent: goose Orbit-Session-Id: c9e24cd7-9c07-436c-8756-f6998b381745
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.
Why?
Breaking SDK changes must land on
sdk-release/next-majorso they do not enter the current major release frommaster.What?
sdk-release/next-major.sdk-release/next-majorintomaster.actionlint, and passes repository CI.See Also
Configuration
skip-changefile: This PR is not a user-facing change, so there's no changefile.