tools: skip check suites with no workflowRun in ci_changes_per_commit.py - #11205
Merged
Conversation
check_suite["workflowRun"] is null for check suites that are not attached to a
workflow run, for example one that was deleted or one belonging to an app
integration. get_commit_depth_and_check_suite() dereferenced it
unconditionally:
TypeError: 'NoneType' object is not subscriptable
which fails the scheduler job's Get-last-commit-with-checks step. Skip those
entries rather than indexing into them.
dhalbert
approved these changes
Aug 17, 2026
dhalbert
left a comment
Collaborator
There was a problem hiding this comment.
Thanks. Makes sense, though I have never encountered this CI error myself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
check_suite["workflowRun"]is null for check suites not attached to a workflow run, such as one whose run was deleted or one belonging to an app integration.get_commit_depth_and_check_suite()indexes into it unconditionally attools/ci_changes_per_commit.py:158:so the scheduler job's "Get last commit with checks" step fails:
When scheduler fails, every downstream job is skipped, so the PR gets no build coverage at all.
Why
An entry with no workflow run can never match "Build CI", so skipping it is the whole fix.
How I tested it
The traceback above is from a real scheduler run on my fork. With the guard, scheduler completes and the downstream jobs run.
No hardware involved. I could not reproduce it on demand, since it depends on which check suites GitHub returns for a given commit.
Scope
One guard, one file. No change to which commit is selected when
workflowRunis present.AI assistance
Written with Claude Code. I reproduced the failure and verified the fix on my own CI.