Uh oh!
There was an error while loading. Please reload this page.
refactor!: Change GitService methods to pass required params by-value instead of by-ref - #3654
Conversation
gmlewis
commented
Jul 27, 2025
Please follow step 4 in CONTRIBUTING.md and push the changes to this PR. |
d124f0e to
826440eComparerupokghosh
commented
Jul 28, 2025
done ✔️ @gmlewis |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #3654 +/- ##
==========================================
- Coverage 91.25% 91.20% -0.05%
==========================================
Files 185 185 Lines 16378 16360 -18 ==========================================
- Hits 14945 14921 -24 - Misses 1249 1254 +5 - Partials 184 185 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
64a09b4 to
d813b23Compare
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @rupokghosh!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
alexandear
commented
Aug 4, 2025
Please extend the PR header to mention that only |
GitService endpoints to pass required params by-value instead of by-refgmlewis
commented
Aug 4, 2025
@alexandear - how's that? |
GitService endpoints to pass required params by-value instead of by-refGitService methods to pass required params by-value instead of by-refgmlewis
commented
Aug 4, 2025
Whups, I think "methods" is better than "endpoints", agreed? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d813b23 to
939e78aCompareupdate exmaples change to using values refactor(git)!: improve CreateRef API with value types and exported struct format new updateref struct remove backwards compatibility create tag in git tags slfhg
939e78a to
92a65bbComparerupokghosh
commented
Aug 4, 2025
let me know if we can merge this in now! |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @rupokghosh and @alexandear!
LGTM.
Merging.
Uh oh!
There was an error while loading. Please reload this page.
…Release Introduce dedicated CreateReleaseRequest and UpdateReleaseRequest types for the bodies of RepositoriesService.CreateRelease and RepositoriesService.UpdateRelease, replacing the *RepositoryRelease parameter that also carried response-only fields. The new types are passed by value and serialized directly, dropping the internal repositoryReleaseRequest remap. EditRelease is renamed to UpdateRelease for naming consistency. This follows the value-parameter pattern established by the merged google#3654, google#3794 and google#4320, the Edit -> Update rename from google#4320, and the dedicated *Request body convention already used across the package (e.g. CreateHostedRunnerRequest). The runtime nil checks are removed since a value parameter makes them unnecessary. No deprecated wrappers are added (clean break). Updates google#3644. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…Release Introduce dedicated CreateReleaseRequest and UpdateReleaseRequest types for the bodies of RepositoriesService.CreateRelease and RepositoriesService.UpdateRelease, replacing the *RepositoryRelease parameter that also carried response-only fields. The new types are passed by value and serialized directly, dropping the internal repositoryReleaseRequest remap. EditRelease is renamed to UpdateRelease for naming consistency. This follows the value-parameter pattern established by the merged google#3654, google#3794 and google#4320, the Edit -> Update rename from google#4320, and the dedicated *Request body convention already used across the package (e.g. CreateHostedRunnerRequest). The runtime nil checks are removed since a value parameter makes them unnecessary. No deprecated wrappers are added (clean break). Updates google#3644.
…Release Introduce dedicated CreateReleaseRequest and UpdateReleaseRequest types for the bodies of RepositoriesService.CreateRelease and RepositoriesService.UpdateRelease, replacing the *RepositoryRelease parameter that also carried response-only fields. The new types are passed by value and serialized directly, dropping the internal repositoryReleaseRequest remap. EditRelease is renamed to UpdateRelease for naming consistency. This follows the value-parameter pattern established by the merged google#3654, google#3794 and google#4320, the Edit -> Update rename from google#4320, and the dedicated *Request body convention already used across the package (e.g. CreateHostedRunnerRequest). The runtime nil checks are removed since a value parameter makes them unnecessary. No deprecated wrappers are added (clean break). Updates google#3644.
…Release Introduce dedicated CreateReleaseRequest and UpdateReleaseRequest types for the bodies of RepositoriesService.CreateRelease and RepositoriesService.UpdateRelease, replacing the *RepositoryRelease parameter that also carried response-only fields. The new types are passed by value and serialized directly, dropping the internal repositoryReleaseRequest remap. EditRelease is renamed to UpdateRelease for naming consistency. This follows the value-parameter pattern established by the merged google#3654, google#3794 and google#4320, the Edit -> Update rename from google#4320, and the dedicated *Request body convention already used across the package (e.g. CreateHostedRunnerRequest). The runtime nil checks are removed since a value parameter makes them unnecessary. No deprecated wrappers are added (clean break). Updates google#3644.
…ue instead of by-ref (google#3654) BREAKING CHANGE: `GitService` methods now pass required params by-value instead of by-ref.
BREAKING CHANGE:
GitServicemethods now pass required params by-value instead of by-ref.What problem are you solving?
Notes
This is most likely going to be a multi PR issue, since this is my first time working on this codebase. I started by picking a "service" area ( Git ) and converted each function that I thought met the criteria set in the issue mentioned, which are: