Skip to content

feat: Add support for enterprise billing cost centers API - #3803

Merged
gmlewis merged 2 commits into
google:masterfrom
gjasny:billing-costcenter
Nov 5, 2025
Merged

feat: Add support for enterprise billing cost centers API#3803
gmlewis merged 2 commits into
google:masterfrom
gjasny:billing-costcenter

Conversation

@gjasny

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecovBot commented Nov 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.27%. Comparing base (c343d93) to head (bb42507).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3803 +/- ##
==========================================
+ Coverage 92.23% 92.27% +0.04% 
==========================================
Files 191 192 +1 Lines 13823 13896 +73 ==========================================
+ Hits 12750 12823 +73 
Misses 884 884 Partials 189 189 

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

This looks great, @gjasny - thank you!
Just one minor tweak, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29

Comment threadgithub/enterprise_billing_cost_centers.go Outdated
@gmlewisgmlewis added the NeedsReview PR is awaiting a review before merging. label Nov 5, 2025
@gjasny
gjasny requested a review from gmlewisNovember 5, 2025 07:50

@stevehipwellstevehipwell left a comment

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.

LGTM

@gmlewisgmlewis removed the NeedsReview PR is awaiting a review before merging. label Nov 5, 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, @gjasny and @stevehipwell!
LGTM.
Merging.

@gmlewis
gmlewis merged commit 943b801 into google:masterNov 5, 2025
7 checks passed
}

// CostCenterListOptions specifies optional parameters to the EnterpriseService.ListCostCenters method.
type CostCenterListOptions struct {

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.

Maybe better:

Suggested change
typeCostCenterListOptionsstruct {
typeListCostCenterOptionsstruct {

It's for consistency with:

typeListArtifactsOptionsstruct {

typeListWorkflowRunsOptionsstruct {

typeListOrgRunnerGroupOptionsstruct {

typeListWorkflowJobsOptionsstruct {

typeListCodespacesOptionsstruct {


// CostCenterListOptions specifies optional parameters to the EnterpriseService.ListCostCenters method.
type CostCenterListOptions struct {
State *string `url:"state,omitempty"`

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.

Let's add a comment:

// Set to `active` or `deleted` to only list cost centers in a specific state.


// CostCenterRequest represents a request to create or update a cost center.
type CostCenterRequest struct {
Name *string `json:"name,omitempty"`

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.

This parameter is required whether we create or update cost center:

Suggested change
Name*string`json:"name,omitempty"`
Namestring`json:"name"`

@gmlewis

Copy link
Copy Markdown
Collaborator

Whups, sorry, @alexandear that I missed your review.
@gjasny - would you mind addressing these comments from @alexandear in a new PR, please?

@gjasny

Copy link
Copy Markdown
ContributorAuthor

Whups, sorry, @alexandear that I missed your review. @gjasny - would you mind addressing these comments from @alexandear in a new PR, please?

Sure. See #3805

@gjasny
gjasny deleted the billing-costcenter branch November 5, 2025 13:25
@gjasny

Copy link
Copy Markdown
ContributorAuthor

Thanks for the fast and thorough review.

jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@gjasny@gmlewis@alexandear@stevehipwell