mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[GHF] Validate graphql output (#83366)
If checkrun nodes are not instance of dictionary, skip them Should prevent https://github.com/pytorch/pytorch/pull/83215#issuecomment-1213617665 from happening in the future Pull Request resolved: https://github.com/pytorch/pytorch/pull/83366 Approved by: https://github.com/kit1980
This commit is contained in:
parent
f02f304657
commit
408fa38f33
3
.github/scripts/trymerge.py
vendored
3
.github/scripts/trymerge.py
vendored
|
|
@ -508,6 +508,9 @@ def add_workflow_conclusions(
|
||||||
has_failing_check = False
|
has_failing_check = False
|
||||||
while checkruns is not None:
|
while checkruns is not None:
|
||||||
for checkrun_node in checkruns["nodes"]:
|
for checkrun_node in checkruns["nodes"]:
|
||||||
|
if not isinstance(checkrun_node, dict):
|
||||||
|
warn(f"Expected dictionary, but got {type(checkrun_node)}")
|
||||||
|
continue
|
||||||
if checkrun_node["conclusion"] == 'FAILURE':
|
if checkrun_node["conclusion"] == 'FAILURE':
|
||||||
has_failing_check = True
|
has_failing_check = True
|
||||||
conclusions[f'{get_check_run_name_prefix(workflow_run)}{checkrun_node["name"]}'] = (
|
conclusions[f'{get_check_run_name_prefix(workflow_run)}{checkrun_node["name"]}'] = (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user