refactor!: Pass RepositoryMergeRequest and RepoMergeUpstreamRequest by value#4372
Open
JamBalaya56562 wants to merge 2 commits into
Open
Conversation
…rge` BREAKING CHANGE: `Repositories.Merge` now takes `RepositoryMergeRequest` by value instead of by pointer, and its required `Base` and `Head` fields are now non-pointer `string` values.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4372 +/- ##
=======================================
Coverage 97.51% 97.51%
=======================================
Files 193 193
Lines 19526 19526
=======================================
Hits 19040 19040
Misses 269 269
Partials 217 217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Jul 8, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
If you could please add the succint "BREAKING CHANGE:" line to the description, that would be appreciated.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
alexandear
reviewed
Jul 8, 2026
…MergeUpstream` BREAKING CHANGE: `Repositories.MergeUpstream` now takes `RepoMergeUpstreamRequest` by value instead of by pointer, and its required `Branch` field is now a non-pointer `string`.
RepositoryMergeRequest by value in Repositories.MergeRepositoryMergeRequest and RepoMergeUpstreamRequest by value
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.
This continues the #3644 value-parameter refactor for the two request bodies in
github/repos_merging.go.Repositories.Merge(POST /repos/{owner}/{repo}/merges)Mergenow takesRepositoryMergeRequestby value.BaseandHeadbecome non-pointerstring(droppingomitempty); the optionalCommitMessagestays*stringwithomitempty. Matches the OpenAPI schema 1:1 (required: [base, head]).Repositories.MergeUpstream(POST /repos/{owner}/{repo}/merge-upstream)MergeUpstreamnow takesRepoMergeUpstreamRequestby value.Branchbecomes a non-pointerstring(required: [branch]).Both types were removed from the
paramcheckbody-allowed-pointer-typesallowlist in.golangci.yml, and accessors were regenerated.Towards #3644