refactor!: Pass OIDCSubjectClaimCustomTemplate by value in the OIDC subject-claim Set methods#4340
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4340 +/- ##
=======================================
Coverage 97.51% 97.51%
=======================================
Files 193 193
Lines 19519 19519
=======================================
Hits 19033 19033
Misses 269 269
Partials 217 217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
… 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.
2b272ae to
2b59582
Compare
|
@JamBalaya56562 - please don't use force-push in this repo when possible (as explained in CONTRIBUTING.md) because it makes it challenging for reviewers to see what actually changed since their last code review. It also doesn't help to get the tests started, as GitHub forces me to manually approve every time it needs to rerun the validation tests. |
|
Apologies, @gmlewis — you're right, and I'm sorry for the force-push. I've read the note in CONTRIBUTING.md and I'll avoid force-pushing on this repo from now on. For context on what the force-push was for: the branch had developed a merge conflict with the latest Going forward, to keep the review history intact, I'll resolve conflicts by merging |
|
OK, no problem, @JamBalaya56562 - if the force-push is necessary, then absolutely go ahead and use it. |
|
Thank you, @stevehipwell! |
BREAKING CHANGE:
SetOrgOIDCSubjectClaimCustomTemplateandSetRepoOIDCSubjectClaimCustomTemplatenow take theirbodyparams by value.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