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

@gjasny gjasny commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot 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.

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

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 thread github/enterprise_billing_cost_centers.go Outdated
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Nov 5, 2025
@gjasny gjasny requested a review from gmlewis November 5, 2025 07:50

@stevehipwell stevehipwell 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

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Nov 5, 2025

@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, @gjasny and @stevehipwell!
LGTM.
Merging.

@gmlewis gmlewis merged commit 943b801 into google:master Nov 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
type CostCenterListOptions struct {
type ListCostCenterOptions struct {

It's for consistency with:

type ListArtifactsOptions struct {

type ListWorkflowRunsOptions struct {

type ListOrgRunnerGroupOptions struct {

type ListWorkflowJobsOptions struct {

type ListCodespacesOptions struct {


// 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"`
Name string `json:"name"`

@gmlewis

gmlewis commented Nov 5, 2025

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

gjasny commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

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

gjasny commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the fast and thorough review.

Sign up for free to 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