Repository navigation
GitHub API and PR Checks
Audience: Programmers | Mixed
Thread Context: N/A (development/process reference)
Platform/Backend Scope: All platforms (
ghCLI + git)
The full workflow for polling PR checks, diagnosing failures, and rerunning jobs via the gh CLI. Paired with Build Optimizations (which explains why the steps below are ordered as they are) and Workflow Patterns (which shows where this fits in the post-push flow).
Use gh pr checks --watch only in an interactive terminal. In any scripted or non-TTY context, use the snapshot form:
gh pr checks # one-shot snapshot
gh pr checks --json name,state,conclusion # machine-readableExit code 1 from gh pr checks while checks are still running is not a failure signal — ignore it and re-poll. See the --watch caveat in Build Optimizations.
gh run list --branch "$(git branch --show-current)" --limit 5Columns: STATUS · CONCLUSION · WORKFLOW · BRANCH · RUN_ID · STARTED. Grab the RUN_ID of the failed run.
gh run view <RUN_ID> --log-failed--log-failed returns only the jobs whose conclusion is failure. Full logs (--log) can run 10-50 MB across the full matrix and are almost always unnecessary.
The relevant failure is almost always the first error: or FAILED line in each job:
gh run view <RUN_ID> --log-failed 2>&1 | grep -nE "error:|FAILED|undefined" | head -20If the root cause is buried (e.g. CMake reports a link error but the real issue was a missing symbol upstream), also scan for the first ninja: build stopped and read ~40 lines above.
Note: this repo also has a report-ci-errors job that aggregates per-job error summaries and uploads them as artifacts (each build job uploads a ci-errors-* / sanitizer-report-* artifact). When present, downloading that artifact can be faster than scraping raw logs.
Pull the matching configuration from .github/workflows/build.yml. The standard Linux jobs use manual flags, but for the common Debug/Release cases the presets match closely enough:
cmake --preset linux-gcc-release && cmake --build build --parallel $(nproc)
cmake --preset linux-gcc-debug && cmake --build build --parallel $(nproc)See CI Reproducible Builds for the full job ↔ command table (including the sanitizer jobs, which use manual cmake -B build flag invocations, not presets).
git add -u && git commit --amend --no-edit
git push --force-with-lease
sleep 15
gh pr checks --fail-fast--force-with-lease refuses the push if the remote moved since your last fetch — safer than plain --force.
- Always fetch before polling if the PR is shared — someone else may have already pushed a fix.
- If the failing job is marked
continue-on-error: trueinbuild.yml, the PR can still merge. As of this writing those arebuild-windows-vs2026,build-linux-mingw-wine,build-macos, andclang-tidy. Don't block on those unless the user explicitly asks. -
gh pr view --json statusCheckRollupreturns the aggregate check state in one call — useful when you only care about red/green.
- Original entry:
GitHub API — PR Checks Diagnosis, last updated 2026-04-17. - Verified against codebase 2026-06-08.
- Updated / found stale:
- Added the
report-ci-errorsjob and theci-errors-*/sanitizer-report-*artifacts as a faster alternative to scraping raw logs (new since the source was written). - Verified the
continue-on-errorjob list against.github/workflows/build.yml:build-windows-vs2026,build-linux-mingw-wine,build-macos,clang-tidy(matchesCLAUDE.md). - Clarified that the sanitizer jobs are reproduced via manual flags, not presets, pointing to the CI Reproducible Builds page.
- Retargeted cross-references to the migrated wiki pages.
- Added the
-
Build Optimizations —
--log-failed,--watchcaveats,--parallel $(nproc)for rebuilds - CI Reproducible Builds — job ↔ command table
- Workflow Patterns — post-push verification flow
- Project conventions (CLAUDE.md) — "Post-PR checks" section
Published from 2b03dc797148. Edit the canonical source in wiki/.
- Documentation
- Docs route
- Wiki index
- Guides
- Tutorials
- Samples
- Examples
- API Reference
- API route
- Reference
- Build Guide
- Dependencies
- FAQ
- Changelog
- Roadmap
- Contributing
- Code of Conduct
- Home
- FAQ
- Getting Started
- Quick-Start Tutorial
- Making Your First Game
- Making Your First Multiplayer Game
- Artist Workflow Guide
- Editor Walkthrough
- Migration Guide
- How SparkEngine Works
- Architecture Overview
- Engine Architecture Flowchart
- Creating a Game Module
- Game Modules (catalog)
- Entity Component System
- Rendering and Graphics
- Physics
- Cloth Simulation
- Audio
- Input System
- Camera System
- Scripting with AngelScript
- Visual Scripting
- AI and Navigation
- Animation
- 2D Systems
- Networking
- Dedicated Server
- Multiplayer Quick Start
- Area Server Architecture
- Scene Management
- Large World Support
- Collaborative Editing
- Coroutine System
- Event System
- Event Response System
- Job System
- UI System
- UI Layout Extensions
- Localization
- Dialogue System
- Destruction System
- Replay System
- Achievement System
- Loading System
- Mod System
- Content Delivery
- Tween System
- Memory Integrity
- Gameplay Systems
- Terrain and Procedural Generation
- Save System
- Persistence System
- Day Night Cycle and Weather
- Cinematic Sequencer
- Runtime Prefabs
- SparkEditor
- Editor Tutorials
- SparkConsole
- SparkDaemon
- Shader Pipeline
- Asset Pipeline
- Asset Validation
- Asset Migration
- Game Packaging
- Online Services
- DataTable System
- Loot and Crafting System
- CSG System
- Font System
- Timer Manager
- Movie Render Pipeline
- HLOD and World Partition
- Remote Debug System
- Selection Manager
- Asset Dependency Graph
- Editor Automation
- File Watcher
- Project Templates
- System Requirements
- VR Support
- Mobile Platform
- Accessibility
- Platform Input
- Platform Certification
- Cross-Compilation: Wine Testing
- RHI Abstraction Layer
- D3D11 Backend
- D3D12 Backend
- Vulkan Backend
- OpenGL Backend
- Metal Backend
- DXR Raytracing
- Hybrid Ray Tracing
- Upscaling (DLSS/FSR)
- Render Graph
- Shader Graph
- GPU Particles
- GPU-Driven Rendering
- Volumetric Fog
- Volumetric Clouds
- Global Illumination
- Virtual Texturing
- Water Rendering
- Clustered Lighting
- Material System
- Post-Processing
- Shadow System
- Particle System
- Decal System
- Sky and Atmosphere
- Foliage System
- Mesh Shaders
- Neural Rendering
- Configuration Reference
- Performance Tips
- Benchmark Framework
- Threading Model
- Fuzz Policy and Parser Security
- Memory Safety
- Memory Management Patterns
- Build System and CMake Modules
- Profiler and Debugging
- Performance Profiling Guide
- Telemetry System
- Crash Reporting
- Golden Image Testing
- Utilities
- Testing
- Fuzz Policy and Parser Security
- Codebase Statistics
- Codebase Health
- Error Handling Patterns
- Hot Reload Overview
- Troubleshooting
- Contributing
- Workflow Patterns
- Build Optimizations
- CI Reproducible Builds
- GitHub API and PR Checks
- Git Rebase Conflicts
- Clang-Format
- Code Quality Violations
- AI Bloat Pattern
- MinGW + Wine Cross-Compilation
- Live Editor Testing
- Engine & Renderer Landscape
- DuetOS Portability Catalog
- Five-Engine Analysis
- Eleven-Engine Analysis
- ThorVG / Unity Graphics Analysis
- Advanced Techniques Catalog
- Third-Party Library Evaluation
- Engine Viability Evaluation
- Engine Feature Recommendations
- Project Recommendations
- Mac Compatibility Analysis
- Codebase Observations
- Codebase Bloat Audit
- Test Suite Audit
- Documentation Coverage Audit
- ThirdParty Dependencies Audit
- Load Test Baseline
- Gameplay Systems Status
- SparkGame Module Status
- Stub and Abandoned Features
- Memory Integrity System
- Memory Safety Evaluation
- Hardware Acceleration Systems
- Jolt Physics Integration
- GPU/CPU Separation Plan
- Daemon Services Architecture
- Reflection & Polymorphism Refactoring Plan
- SparkBuild In-Tree
- Wine No-JobSystem Breakthrough
- Wine Role and Fallback Tiers