Skip to content

refactor!: Pass release-notes and asset params by value and rename EditReleaseAsset to UpdateReleaseAsset#4336

Open
JamBalaya56562 wants to merge 1 commit into
google:masterfrom
JamBalaya56562:refactor/3644-release-notes-asset-value-params
Open

refactor!: Pass release-notes and asset params by value and rename EditReleaseAsset to UpdateReleaseAsset#4336
JamBalaya56562 wants to merge 1 commit into
google:masterfrom
JamBalaya56562:refactor/3644-release-notes-asset-value-params

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: GenerateReleaseNotes now takes GenerateNotesRequest by value (renamed from GenerateNotesOptions); EditReleaseAsset is renamed to UpdateReleaseAsset and takes UpdateReleaseAssetRequest by value.

Towards #3644.

Finishes the value-parameter conversion of repos_releases.go, picking up the follow-up explicitly called out in #4329 (which converted CreateRelease/UpdateRelease and noted that EditReleaseAsset/GenerateReleaseNotes were 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 renamed GenerateNotesOptions -> GenerateNotesRequest (Options -> Request suffix). tag_name stays 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 dedicated UpdateReleaseAssetRequest is introduced (name, label, state — the documented request fields, all optional per the API schema) instead of reusing the ReleaseAsset response struct as the request body.
  • Dropped GenerateNotesOptions and ReleaseAsset from the paramcheck body-allowed-pointer-types / body-allowed-wrong-names allow-lists in .golangci.yml.
  • No deprecated wrappers are added (clean break), consistent with refactor!: Pass GistsService required params by value #4320/refactor!: Pass release params by value and rename EditRelease to UpdateRelease #4329.
  • Generated accessors regenerated accordingly.

Breaking changes

  • GenerateReleaseNotes now takes GenerateNotesRequest by value; GenerateNotesOptions is renamed to GenerateNotesRequest.
  • EditReleaseAsset is renamed to UpdateReleaseAsset and takes UpdateReleaseAssetRequest by value (instead of *ReleaseAsset).

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.48%. Comparing base (c9f5330) to head (aaf2554).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @JamBalaya56562!
One minor nit, otherwise LGTM.

cc: @stevehipwell - @alexandear - @Not-Dhananjay-Mishra

Comment thread github/repos_releases_test.go Outdated
…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
@JamBalaya56562 JamBalaya56562 force-pushed the refactor/3644-release-notes-asset-value-params branch from f6242a0 to aaf2554 Compare June 27, 2026 00:35
@JamBalaya56562 JamBalaya56562 requested a review from gmlewis June 27, 2026 00:37

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants