Skip to content

refactor!: Remove pointer from required field of CreateStatus API - #3794

Merged
gmlewis merged 1 commit into
google:masterfrom
alkak95:issue-3644
Oct 28, 2025
Merged

refactor!: Remove pointer from required field of CreateStatus API#3794
gmlewis merged 1 commit into
google:masterfrom
alkak95:issue-3644

Conversation

@alkak95

@alkak95alkak95 commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: RepositoriesService.CreateStatus now takes value for status, not pointer.

Relates to: #3644

Description: fixes part of issue Refactor codebase to use value parameters instead of pointers where appropriate #3644

Fix: To improve API design consistency and safety as per issue, removed unnecessary pointer in the file repo_statuses.go

Tested by running go test ./... command.

@alkak95

Copy link
Copy Markdown
ContributorAuthor

@gmlewis I have made a sample change , If it looks good, I will go ahead and make changes in other files as well.
This change is made because it's a POST API and it should have some body to process the request, hence removed the pointer from func signature.

@gmlewisgmlewis changed the title Remove pointer from required field of CreateStatus APIrefactor!: Remove pointer from required field of CreateStatus APIOct 28, 2025
@codecov

codecovBot commented Oct 28, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.17%. Comparing base (22f7fe3) to head (98357c9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3794 +/- ##
=======================================
Coverage 92.17% 92.17% =======================================
Files 191 191 Lines 13690 13690 =======================================
Hits 12619 12619 Misses 883 883 Partials 188 188 

☔ 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.

@gmlewisgmlewis 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 Oct 28, 2025

@gmlewisgmlewis 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, @alkak95!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29

@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you, @zyfy29!
Merging.

@gmlewisgmlewis removed the NeedsReview PR is awaiting a review before merging. label Oct 28, 2025
@gmlewis
gmlewis merged commit 53d0e6a into google:masterOct 28, 2025
7 checks passed
JamBalaya56562 added a commit to JamBalaya56562/go-github that referenced this pull request Jun 25, 2026
…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>
JamBalaya56562 added a commit to JamBalaya56562/go-github that referenced this pull request Jun 25, 2026
…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.
JamBalaya56562 added a commit to JamBalaya56562/go-github that referenced this pull request Jun 25, 2026
…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.
JamBalaya56562 added a commit to JamBalaya56562/go-github that referenced this pull request Jun 26, 2026
…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.
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
…ogle#3794)
BREAKING CHANGE: `RepositoriesService.CreateStatus` now takes value for `status`, not pointer.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API ChangePR 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.

2 participants

@alkak95@gmlewis