Skip to main content

Preventing overspending

Learn how to set budgets and track when they are nearing or above a threshold to prevent overspending.

谁可以使用此功能?

组织所有者、账单管理员和个人帐户用户

在 GitHub Enterprise Cloud 之外,新的计费平台仅可用于:****

  • 在 2024 年 11 月 13 日之后创建的 GitHub Team 计划中的组织帐户。
  • 在 2025 年 2 月 4 日之后创建的 GitHub Free 计划中的组织帐户。
  • 2025 年 2 月 13 日之后创建的 GitHub Free 或 GitHub Pro 中的个人帐户。

从 2025 年 2 月开始,GitHub 会将 GitHub Team 中的组织迁移到新的计费平台。 组织将在迁移前 30 天收到通知。

对于在 2025 年 2 月 13 日之前创建的现有个人帐户,GitHub 将在 2025 年 6 月 30 日结束前将个人帐户迁移到新的计费平台。

Budgets and alerts allow you to track spending for your organization or personal account. By setting a monthly budget, you can monitor your spending and receive notifications by email when your spending exceeds certain preset percentages of your budget threshold. This can help you stay within your budget and avoid overspending.

The budget only applies to expenses incurred from the date of its creation onwards. Any expenses incurred prior to the creation of the budget will not be included in the calculations

For license-based products such as GitHub Copilot, Advanced Security, and GitHub Team, setting a budget does not prevent usage over the limit.

For the GitHub Copilot Premium Request SKU, to set a spending limit for premium requests over your plan's allowance, you can update the default $0 SKU-level budget and select “Stop usage when budget limit is reached”.

Note

By default, paid usage will be limited to $0 for accounts that do not have a payment method on file.

Managing budgets for your personal account

You can set spending limits and receive alerts when your usage reaches 75%, 90%, or 100% of your defined budget. Budgets can be scoped at the repository or product level, depending on the product.

  1. 在 GitHub 任意页面的右上角,单击个人资料照片,然后单击 “设置”****。
  2. In the "Access" section of the sidebar, click Billing & Licensing.
  3. Click Budgets and alerts.
  4. To create a new budget, click New budget and follow the prompts.
  5. To edit or delete a budget, click Edit or Delete next to the budget you want to edit or delete. Follow the prompts.

Managing budgets for your 组织

You can manage budgets for your 组织 by setting a budget, viewing budgets, and editing or deleting budgets.

Viewing budgets

If you are an 组织 owner or billing manager, your 组织's budget will be listed at the top of the "Budgets and alerts" page.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击“ 你的组织”****。

  2. 在组织旁边,单击“设置”。

  3. 在页面左侧的组织边栏中,单击“Billing & Licensing”****。

  4. Click Budgets and alerts.

Creating a budget

As an 组织 owner, you can set the budget for your 组织.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击“ 你的组织”****。

  2. 在组织旁边,单击“设置”。

  3. 在页面左侧的组织边栏中,单击“Billing & Licensing”****。

  4. 单击“预算和警报”****。

  5. 单击“新建预算”****。

  6. 在“Budget Type”下,选择“Product-level budget”或“SKU-level budget”********。

    • 若要创建产品级预算,请从下拉菜单中选择按流量计费的产品。
    • 若要创建 SKU 级预算,请从下拉菜单中选择 SKU。 这会限制单个 SKU 的支出。
  7. 在“预算范围”下,设置此预算的支出范围。

  8. Under "Budget", set a budget amount.

    To stop any usage and further spending once your organization reaches the budget limit, select Stop usage when budget limit is reached, if available.

    Important

    If you do not select Stop usage when budget limit is reached, you will be notified by email if you exceed your budget, but usage will not be stopped.

  9. To receive an alert if your budget has reached 75%, 90% and 100% thresholds, select Receive budget threshold alerts under "Alerts". When the budget has reached the specific threshold, you will be notified via email and a banner on GitHub. You may opt out at any time.

    Under "Alert Recipients", select the people who will receive the alerts.

  10. Click Create budget.

Editing or deleting a budget

As an organization owner, you can edit or delete a budget at any time, but you cannot change the budget scope.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击“ 你的组织”****。

  2. 在组织旁边,单击“设置”。

  3. 在页面左侧的组织边栏中,单击“Billing & Licensing”****。

  4. Click Budgets and alerts.

  5. To edit a budget, in the list of budgets, click next to the budget you want to edit, and click Edit or Delete.

  6. Follow the prompts.