Repository navigation
fix!: Remove fields that can no longer be updated from EnterpriseUpdateBudget - #4699
JamBalaya56562 wants to merge 2 commits into
Conversation
|
As far as I know, we prefer not to remove fields that GitHub has recently deprecated or removed, especially fields for enterprise endpoints. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4699 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 203 203
Lines 19027 19027
=======================================
Hits 18769 18769
Misses 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks! These budget endpoints are only in the GHEC description; none of the GHES descriptions have them, so on-prem users cannot call them. Since they are cloud-only, I think removing fields the cloud API no longer accepts is fine here. I'm happy to keep them with a |
Thanks for the clarification. |
Fixes #4698.
BREAKING CHANGE:
EnterpriseUpdateBudget.BudgetScope,EnterpriseUpdateBudget.BudgetEntityName,EnterpriseUpdateBudget.BudgetType, andEnterpriseUpdateBudget.BudgetProductSKUare removed because the "Update a budget" request schema no longer has them.The request body schema of
PATCH /enterprises/{enterprise}/settings/billing/budgets/{budget_id}now has onlybudget_alerting,budget_amount,expires_at, andprevent_further_usage(OpenAPI description066b825d, picked up by #4693).Two commits:
fix!- Remove the four fields fromEnterpriseUpdateBudget. This clears the fourscript/check-schema-fields.shwarnings that master reports since chore: Update openapi_operations.yaml #4693.feat- Add the missingexpires_at(ExpiresAt) toEnterpriseCreateBudgetandEnterpriseUpdateBudget, anduser(User) toEnterpriseCreateBudget. Both are optional*string.ExpiresAtis aYYYY-MM-DDdate, as in the schema. The update schema also acceptsnullor0to remove an expiration date, which a*stringwithomitemptycannot send; this PR does not add a way to do that.Verified locally:
go build ./...,go vet -tags integration ./test/integration/,examplemodule build,go test ./github/, generated files idempotent,custom-gcl0 issues, andscript/check-schema-fields.shreports 11 findings, all grandfathered (the 4EnterpriseUpdateBudgetwarnings are gone).