Skip to content

Commit

Permalink
fix key error on check_run (#479)
Browse files Browse the repository at this point in the history
Co-authored-by: Katherine Fairchild <[email protected]>
  • Loading branch information
kvfairchild and Katherine Fairchild authored Jan 8, 2024
1 parent e1781f3 commit bcf2ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brainscore_vision/submission/check_test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_pr_head_sha() -> Union[str, None]:

elif event_type == "check_run":
f = _load_event_file()
pr_head_sha = f["head_sha"]
pr_head_sha = f["check_run"]["head_sha"]

elif event_type == "pull_request":
pr_head_sha = os.environ["GITHUB_HEAD_REF"]
Expand All @@ -37,7 +37,7 @@ def print_pr_head_sha():

def get_data(url: str) -> dict:
r = requests.get(url)
assert r.status_code == 200
assert r.status_code == 200, f'{r.status_code}: {r.reason}'
return r.json()

def _get_end_time(d: dict) -> str:
Expand Down

0 comments on commit bcf2ab1

Please sign in to comment.