refactor!: Pass release-notes and asset params by value and rename EditReleaseAsset to UpdateReleaseAsset#4336
Open
JamBalaya56562 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4336 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 193 193
Lines 19417 19417
=======================================
Hits 18929 18929
Misses 270 270
Partials 218 218 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
requested changes
Jun 26, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
One minor nit, otherwise LGTM.
…ditReleaseAsset` to `UpdateReleaseAsset` Continues the google#3644 value-parameter migration for repos_releases.go, finishing the file after CreateRelease/UpdateRelease (google#4329). - GenerateReleaseNotes now takes GenerateNotesRequest by value (renamed from GenerateNotesOptions). - EditReleaseAsset is renamed to UpdateReleaseAsset and takes a dedicated UpdateReleaseAssetRequest{Name, Label} by value instead of reusing the *ReleaseAsset response struct. - Drop the now-converted types (GenerateNotesOptions, ReleaseAsset) from the paramcheck allowlists in .golangci.yml. Generated accessors regenerated accordingly. Updates google#3644
f6242a0 to
aaf2554
Compare
gmlewis
approved these changes
Jun 27, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
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.
BREAKING CHANGE:
GenerateReleaseNotesnow takesGenerateNotesRequestby value (renamed fromGenerateNotesOptions);EditReleaseAssetis renamed toUpdateReleaseAssetand takesUpdateReleaseAssetRequestby value.Towards #3644.
Finishes the value-parameter conversion of
repos_releases.go, picking up the follow-up explicitly called out in #4329 (which convertedCreateRelease/UpdateReleaseand noted thatEditReleaseAsset/GenerateReleaseNoteswere left for later because they also involve allow-list and type-name changes). Continues the pattern from the merged #3654, #3794, #4320 and #4329.Changes
GenerateReleaseNotes(ctx, owner, repo string, body *GenerateNotesOptions)->body GenerateNotesRequest. The type is renamedGenerateNotesOptions->GenerateNotesRequest(Options->Requestsuffix).tag_namestays required (non-pointer) per the API schema; the other fields stay optional.EditReleaseAsset(ctx, owner, repo string, id int64, body *ReleaseAsset)->UpdateReleaseAsset(..., body UpdateReleaseAssetRequest). A dedicatedUpdateReleaseAssetRequestis introduced (name,label,state— the documented request fields, all optional per the API schema) instead of reusing theReleaseAssetresponse struct as the request body.GenerateNotesOptionsandReleaseAssetfrom theparamcheckbody-allowed-pointer-types/body-allowed-wrong-namesallow-lists in.golangci.yml.GistsServicerequired params by value #4320/refactor!: Pass release params by value and renameEditReleasetoUpdateRelease#4329.Breaking changes
GenerateReleaseNotesnow takesGenerateNotesRequestby value;GenerateNotesOptionsis renamed toGenerateNotesRequest.EditReleaseAssetis renamed toUpdateReleaseAssetand takesUpdateReleaseAssetRequestby value (instead of*ReleaseAsset).