Skip to content

feat: Support OIDC custom property claims for Actions#4411

Open
sswane wants to merge 7 commits into
google:masterfrom
sswane:oidc-custom-props
Open

feat: Support OIDC custom property claims for Actions#4411
sswane wants to merge 7 commits into
google:masterfrom
sswane:oidc-custom-props

Conversation

@sswane

@sswane sswane commented Jul 25, 2026

Copy link
Copy Markdown

Adds GET, POST, DELETE methods for enterprises and organizations OIDC custom property claims for GitHub Actions.

  • /enterprises/{enterprise}/actions/oidc/customization/properties/repo
  • /orgs/{org}/actions/oidc/customization/properties/repo

API Docs: https://docs.github.com/en/rest/actions/oidc?apiVersion=2026-03-10

closes #4407

Comment thread openapi_operations.yaml
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Jul 25, 2026
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.53%. Comparing base (7de90cf) to head (274c01d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4411   +/-   ##
=======================================
  Coverage   97.52%   97.53%           
=======================================
  Files         193      193           
  Lines       19668    19709   +41     
=======================================
+ Hits        19182    19223   +41     
  Misses        268      268           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 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 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, @sswane!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @Not-Dhananjay-Mishra

Comment thread github/actions_oidc.go
Comment thread github/actions_oidc.go
// GitHub API docs: https://docs.github.com/rest/actions/oidc?apiVersion=2022-11-28#create-an-oidc-custom-property-inclusion-for-an-enterprise
//
//meta:operation POST /enterprises/{enterprise}/actions/oidc/customization/properties/repo
func (s *ActionsService) SetEnterpriseOIDCCustomPropertyClaim(ctx context.Context, enterprise string, body OIDCCustomPropertyClaim) (*OIDCCustomPropertyClaim, *Response, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can't use OIDCCustomPropertyClaim here. Because this endpoint only accepts custom_property_name in body parameter. so let's introduce a new request struct for this.

Image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ah right. just added a new type OIDCCustomPropertyClaimResponse and updated the List/GET methods to use that instead.

Comment thread github/actions_oidc.go
// GitHub API docs: https://docs.github.com/rest/actions/oidc?apiVersion=2022-11-28#create-an-oidc-custom-property-inclusion-for-an-organization
//
//meta:operation POST /orgs/{org}/actions/oidc/customization/properties/repo
func (s *ActionsService) SetOrgOIDCCustomPropertyClaim(ctx context.Context, org string, body OIDCCustomPropertyClaim) (*OIDCCustomPropertyClaim, *Response, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here.
Let's introduce a new request struct for this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I ended up making OIDCCustomPropertyClaimResponse and updating the List/GET methods to use that but I can instead switch it back & create the Request one if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support setting OIDC custom property claims for GitHub Actions

3 participants