{"meta":{"title":"GitHub Code Quality 计费","intro":"除了标准的 GitHub Actions 分钟数外，GitHub Code Quality 计费还具有以下两个部分：每个提交者的许可证，以及 AI 驱动的功能的 AI credit 用量。","product":"计费与付款","breadcrumbs":[{"href":"/zh/billing","title":"计费与付款"},{"href":"/zh/billing/concepts","title":"概念"},{"href":"/zh/billing/concepts/product-billing","title":"产品计费"},{"href":"/zh/billing/concepts/product-billing/github-code-quality","title":"GitHub代码质量"}],"documentType":"article"},"body":"# GitHub Code Quality 计费\n\n除了标准的 GitHub Actions 分钟数外，GitHub Code Quality 计费还具有以下两个部分：每个提交者的许可证，以及 AI 驱动的功能的 AI credit 用量。\n\n## GitHub Code Quality 计费的衡量方式\n\n使用 Code Quality 会给组织带来三种类型的成本：\n\n* [\n  GitHub Actions分钟](#github-actions-minutes)\n* [GitHub AI Credits](#github-ai-credits)\n* [活跃提交者和独立提交者](#active-and-unique-committers)\n\n### GitHub Actions 分钟\n\nCode Quality 扫描作为 GitHub Actions 工作流运行，并消耗 GitHub Actions 分钟，除非你使用自托管运行器。 请参阅“[GitHub Actions计费](/zh/billing/concepts/product-billing/github-actions)”。\n\n在详细使用情况报告中，你可以通过筛选 `workflow_path` 字段为 `Code Quality` 来识别来自 dynamic/github-code-quality/codeql 扫描的使用情况。\n\n### GitHub AI Credits\n\nCode Quality 使用 AI 模型的功能从你的共享 AI credits 池中消耗 AI credits，而不是从单独的 Code Quality 配额中消耗。 每次交互均按消耗的令牌数量计费，其中，1 AI credit = $0.01 USD。\n\nCode Quality is a purpose-built product that uses a carefully tuned mix of models, prompts, and system behaviors to deliver consistent, high-quality analysis across a wide range of codebases. Model switching is not supported, as changing the model is likely to compromise the reliability and accuracy of analysis results.\n\n有关工作原理 AI credits 的详细信息，请参阅 [Usage-based billing for organizations and enterprises](/zh/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises)。\n\n### 活动提交者和唯一提交者\n\nCode Quality 是具有自身许可证的独立产品，不使用 GitHub Advanced Security 任何其他产品的许可证。\nGitHub App 机器人将被忽略。 有关机器人帐户和计算机帐户之间的差异，请参阅“[GitHub 应用和 OAuth 应用之间的差异](/zh/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps#machine-vs-bot-accounts)”。\n\n* 在启用 Code Quality 功能的情况下，可根据存储库的唯一活动提交者数量计算许可证使用情况。\n* 每个 **活动提交者** 都使用 **一个 Code Quality 许可证**。\n* 如果提交者的一个提交在过去 90 天内被推送到存储库，则提交者被视为处于活跃状态，无论最初创作的时间如何。\n\n要了解你的许可证使用情况以及哪些许可证可以释放，区分活跃提交者和唯一提交者会有所帮助。 可以在组织或企业的 **“许可** ”页上看到使用的许可证数，显示为 **“已使用许可证”**：\n\n* **活跃提交者**是指至少为一个仓库做出过贡献，并拥有贵组织或企业的 GitHub Team 或 GitHub Enterprise 许可证的提交者。 这包括成员、企业托管用户、外部协作者，以及已收到加入您的组织或企业的待处理邀请的人员。\n* **唯一提交者**是指只为一个仓库或一个组织的仓库做出贡献的活动提交者数。 通过为该存储库或组织禁用Code Quality，可以释放此数量的许可证。\n\n用户可以参与多个存储库或组织。 使用情况在整个组织或企业范围内进行衡量，以确保每个成员都使用一个许可证，无论用户对多少个仓库或组织做出贡献。\n\n## 延伸阅读\n\n* [防止默认分支上出现代码质量问题](/zh/code-security/tutorials/improve-code-quality/catch-issues-before-merge)\n* [GitHub Actions计费](/zh/billing/concepts/product-billing/github-actions)\n* [Usage-based billing for organizations and enterprises](/zh/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises)"}