REQUIRED_CHECK_NOT_FOUND cicd config_error ai_generated true

错误:在流程中未找到必需的检查项 'ci / test (node-16)'。该检查项必须在仓库的工作流配置中定义。

Error: Required check 'ci / test (node-16)' was not found in the workflow. The check must be defined in the repository's workflow configuration.

ID: cicd/github-actions-required-check-not-found

其他格式: JSON · Markdown 中文 · English
90%修复率
88%置信度
1证据数
2024-01-10首次发现

版本兼容性

版本状态引入弃用备注
GitHub Actions active
GitHub Enterprise Server 3.8 active
GitHub.com (2024) active

根因分析

分支保护规则中配置的必需状态检查引用了当前工作流文件中不存在的检查名称,通常是因为重命名了任务或更改了工作流文件名。

English

A required status check configured in branch protection rules references a check name that does not match any job in the current workflow files, often due to renaming a job or changing the workflow filename.

generic

官方文档

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks

解决方案

  1. Update the branch protection rule to use the correct check name: Go to Settings > Branches > Edit protection rule for the branch, and update the 'Status checks found in last week for this repository' list with the correct job name.
  2. Rename the job in the workflow file to match the required check name exactly, including matrix strategy labels.
  3. Temporarily disable the required check in branch protection to allow merging, then correct the workflow and re-enable the check.

无效尝试

常见但无效的做法:

  1. 90% 失败

    The branch protection rule is static and must be updated manually to match the workflow.

  2. 85% 失败

    Branch protection rules apply to all branches matching a pattern, not to individual branches.

  3. 80% 失败

    The required check name must exactly match the job name in the workflow, including matrix axes.