refactor!: Pass OIDCSubjectClaimCustomTemplate by value in the OIDC subject-claim Set methods#4340
Open
JamBalaya56562 wants to merge 2 commits into
Open
Conversation
… subject-claim Set methods BREAKING CHANGE: `Actions.SetOrgOIDCSubjectClaimCustomTemplate` and `Actions.SetRepoOIDCSubjectClaimCustomTemplate` now take `OIDCSubjectClaimCustomTemplate` by value instead of by pointer.
…ectClaimCustomTemplate` The Actions OIDC subject-claim customization schema includes two fields that were missing from `OIDCSubjectClaimCustomTemplate`: - `use_immutable_subject` (*bool): present in the org and repo request bodies and responses; opts in to the immutable, repository-ID-based OIDC `sub` claim format. - `sub_claim_prefix` (*string): the current `sub` claim prefix, returned by the repository GET response. Both are optional, so the change is non-breaking. Regenerate the accessors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4340 +/- ##
=======================================
Coverage 97.50% 97.50%
=======================================
Files 193 193
Lines 19451 19451
=======================================
Hits 18965 18965
Misses 269 269
Partials 217 217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Jun 29, 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.
This continues the #3644 value-parameter refactor for the Actions OIDC subject-claim customization methods.
Pass the request body by value (refactor!)
Actions.SetOrgOIDCSubjectClaimCustomTemplateandActions.SetRepoOIDCSubjectClaimCustomTemplatenow takeOIDCSubjectClaimCustomTemplateby value instead of by pointer, along with the sharedsetOIDCSubjectClaimCustomTemplatehelper.SetRepoOIDCSubjectClaimCustomTemplatebody parameter fromtemplatetobody.OIDCSubjectClaimCustomTemplatefrom theparamcheckbody-allowed-pointer-typesallowlist in.golangci.yml.The type stays shared between the
Get*(response) andSet*(request) methods, matching existing by-value shared types such asRepositoryRulesetandCodeSecurityConfiguration.Add two missing OpenAPI fields (feat)
UseImmutableSubject(use_immutable_subject) — present in both the org and repo request bodies and responses.SubClaimPrefix(sub_claim_prefix) — returned by the repository-level GET response.Both are optional, so this part is non-breaking. Accessors regenerated.
Towards #3644