REQUIRED_CHECK_NOT_FOUND cicd config_error ai_generated true

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

Also available as: JSON · Markdown · 中文
90%Fix Rate
88%Confidence
1Evidence
2024-01-10First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
GitHub Actions active
GitHub Enterprise Server 3.8 active
GitHub.com (2024) active

Root Cause

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

中文

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

Official Documentation

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

Workarounds

  1. 95% success 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.
    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. 85% success Rename the job in the workflow file to match the required check name exactly, including matrix strategy labels.
    Rename the job in the workflow file to match the required check name exactly, including matrix strategy labels.
  3. 80% success Temporarily disable the required check in branch protection to allow merging, then correct the workflow and re-enable the check.
    Temporarily disable the required check in branch protection to allow merging, then correct the workflow and re-enable the check.

中文步骤

  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.

Dead Ends

Common approaches that don't work:

  1. 90% fail

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

  2. 85% fail

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

  3. 80% fail

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