Skip to content

tools: fix ci_changes_per_commit.py crash on null workflowRun - #63

Closed
mikeysklar wants to merge 1 commit into
mainfrom
fix/ci-null-workflowrun
Closed

tools: fix ci_changes_per_commit.py crash on null workflowRun#63
mikeysklar wants to merge 1 commit into
mainfrom
fix/ci-null-workflowrun

Conversation

@mikeysklar

Copy link
Copy Markdown
Owner

What

check_suite["workflowRun"] is null for check suites not attached to a workflow run, such as one that was deleted or one belonging to an app integration. get_commit_depth_and_check_suite() dereferenced it unconditionally and raised TypeError: 'NoneType' object is not subscriptable, failing the scheduler job's Get-last-commit-with-checks step.

Why

Tooling only. Skipping those entries is the minimal fix; the loop is looking for the "Build CI" workflow run and an entry without one can never match.

Hardware tested

Not applicable, this is a CI script.

Scope

One guard, one file. No change to which commit is selected when workflowRun is present.

AI assistance

Written with Claude Code.

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.
@mikeysklar mikeysklar closed this Aug 17, 2026
@mikeysklar mikeysklar reopened this Aug 17, 2026
@mikeysklar

Copy link
Copy Markdown
Owner Author

Merged upstream as adafruit#11205. Closing so there is a single thread.

@mikeysklar mikeysklar closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant