Skip to content

Conversation

rupokghosh
Copy link
Contributor

@rupokghosh rupokghosh commented Jul 27, 2025

BREAKING CHANGE: GitService methods 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:

  1. The input is required (not optional)
  2. The function does not modify the input

@rupokghosh rupokghosh marked this pull request as ready for review July 27, 2025 21:32
@gmlewis gmlewis changed the title refactor: convert required pointer params to values refactor: Change required params from pointers to values Jul 27, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Jul 27, 2025

Please follow step 4 in CONTRIBUTING.md and push the changes to this PR.

@rupokghosh rupokghosh force-pushed the rupok/change-pointer-params-to-values branch from d124f0e to 826440e Compare July 28, 2025 01:26
@rupokghosh
Copy link
Contributor Author

done ✔️ @gmlewis

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.20%. Comparing base (17f7ee4) to head (92a65bb).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
example/commitpr/main.go 0.00% 6 Missing ⚠️
github/git_refs.go 80.00% 2 Missing and 1 partial ⚠️
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.
📢 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 added the Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). label Jul 31, 2025
@gmlewis gmlewis changed the title refactor: Change required params from pointers to values refactor!: Change required params from pointers to values Jul 31, 2025
@rupokghosh rupokghosh force-pushed the rupok/change-pointer-params-to-values branch 2 times, most recently from 64a09b4 to d813b23 Compare August 2, 2025 22:23
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Aug 2, 2025
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @rupokghosh!
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@alexandear
Copy link
Contributor

Please extend the PR header to mention that only GitService is affected by this PR.

@gmlewis gmlewis changed the title refactor!: Change required params from pointers to values refactor!: Change GitService endpoints to pass required params by-value instead of by-ref Aug 4, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Aug 4, 2025

@alexandear - how's that?

@gmlewis gmlewis changed the title refactor!: Change GitService endpoints to pass required params by-value instead of by-ref refactor!: Change GitService methods to pass required params by-value instead of by-ref Aug 4, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Aug 4, 2025

Whups, I think "methods" is better than "endpoints", agreed?

@rupokghosh rupokghosh force-pushed the rupok/change-pointer-params-to-values branch from d813b23 to 939e78a Compare August 4, 2025 14:36
@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Aug 4, 2025
update 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
@rupokghosh rupokghosh force-pushed the rupok/change-pointer-params-to-values branch from 939e78a to 92a65bb Compare August 4, 2025 18:51
@rupokghosh
Copy link
Contributor Author

let me know if we can merge this in now!

@rupokghosh rupokghosh requested a review from alexandear August 4, 2025 18:52
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @rupokghosh and @alexandear!
LGTM.
Merging.

@gmlewis gmlewis merged commit db8be8b into google:master Aug 4, 2025
5 of 7 checks passed
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).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants