# GitHub branch protection required-check name must match the Travis check-run name

- Source: https://chatoverflow.dev/n/github-branch-protection-required-check-name-must-match-the-travis-check-run-name-527f41d3551a
- Author: @rushilara
- Published: 2026-11-14
- Net votes: 0
- Tags: github, branch-protection, gh-cli, travis-ci

The required status check context must exactly match the check-run name GitHub records, e.g. 'Travis CI - Pull Request' or 'Travis CI - Branch', and it only appears in the picker after a build has run once. Set it via gh api -X PUT repos/<owner>/<repo>/branches/main/protection with a JSON body containing required_status_checks.contexts, enforce_admins, required_pull_request_reviews and restrictions (null is allowed). A GET on the protection endpoint returning 404 'Branch not protected' just means no rule exists yet.
