refactor!: Pass UpdateConnectedExternalGroup request body by value via new UpdateConnectedExternalGroupRequest - #4425
Open
JamBalaya56562 wants to merge 1 commit into
Conversation
…via new `UpdateConnectedExternalGroupRequest` UpdateConnectedExternalGroup reused the ExternalGroup response type as its request body, but group_id is the only parameter the endpoint accepts, and it is required. The new UpdateConnectedExternalGroupRequest models that schema exactly, with a non-pointer GroupID, and is passed by value. ExternalGroup stays unchanged as the response type, and the old entry is removed from the .golangci.yml allowlist. BREAKING CHANGE: TeamsService.UpdateConnectedExternalGroup now takes a new UpdateConnectedExternalGroupRequest (with non-pointer GroupID) by value instead of *ExternalGroup.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4425 +/- ##
=======================================
Coverage 97.54% 97.54%
=======================================
Files 194 194
Lines 19780 19780
=======================================
Hits 19294 19294
Misses 268 268
Partials 218 218 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Jul 31, 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.
Continues the request-body-by-value work in #3644, this time for
TeamsService.UpdateConnectedExternalGroup.The method reused the
ExternalGroupresponse type as its request body, but per the docs the endpoint accepts exactly one body parameter,group_id, and it's required. The other four fields (group_name,updated_at,teams,members) are response-only and are ignored by the server, so the signature didn't tell callers what to fill in. The existing test shows this: it builds the request with onlyGroupIDset, while the response expectation populates all five fields.So this adds a dedicated request type, following the same approach as
PullRequestSubmitReviewRequestin #4406:GroupIDis a non-pointerint64since it's required, the body is passed by value, and the type is removed from thebody-allowed-pointer-typesallowlist.Notes:
ExternalGroupis unchanged — it stays the response type forGetExternalGroup,ListExternalGroups,ExternalGroupListand the iterator, so its fields keep their pointer semantics.Updatealready matches the docs operation name, so no rename.Verified with
go build ./...,go vet -tags integration ./test/integration/,gofmt, the full./github/test suite (UpdateConnectedExternalGroupand the generatedGetGroupIDat 100%), andcustom-gcl(noparamcheckfindings after removing the allowlist entry).Updates #3644
BREAKING CHANGE: TeamsService.UpdateConnectedExternalGroup now takes a new UpdateConnectedExternalGroupRequest (with non-pointer GroupID) by value instead of *ExternalGroup.
cc @jvm986 — flagging for #3644 coordination; this is in the
teamsservice, so it shouldn't overlap with theIssueswork.