Status Check Operations¶
Debugging Failed Checks¶
Quick Start
This guide is part of a modular documentation set. Refer to related guides in the navigation for complete context.
View Check Details¶
# Get check run details
gh api repos/org/repo/commits/abc123/check-runs \
--jq '.check_runs[] | {name, conclusion, output}'
Re-run Failed Checks¶
Check Status URL¶
Every PR shows status check URLs. Click through to workflow logs.
Evidence for Auditors¶
Demonstrate enforcement with API queries:
# Show all PRs from March 2025 had required checks
gh api 'repos/org/repo/pulls?state=closed&base=main' \
--jq '.[] | select(.merged_at | startswith("2025-03")) |
{pr: .number, checks: .statuses_url}'
For each PR, show check results:
Auditors verify all merged code passed required checks.
Cost Optimization¶
GitHub Actions minutes cost money. Optimize checks:
Cache Dependencies¶
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Path Filtering¶
Don't run Go tests when only markdown changed.
Self-Hosted Runners¶
Free compute for private repos.
Related Patterns¶
- Core Concepts - Status check fundamentals
- Configuration Patterns - Required vs optional checks
- Branch Protection - Enforcement framework
- Zero-Vulnerability Pipelines - Security scanning gates
- Pre-commit Hooks - Earlier validation
- Audit Evidence Collection - Comprehensive evidence gathering
Required checks blocked the PR. Tests failed. Vulnerabilities found. The code didn't merge. The pipeline worked.