Skip to content

Commit cc0df53

Browse files
authored
Fix --commit flag in gh_report.py to use check-runs API (#4869)
The commit status API returns empty statuses for commits on main. Switch to the check-runs API which has the "Integration Tests" check run with the deco-tests run ID in its details_url.
1 parent c34f8d9 commit cc0df53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/gh_report.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def get_pr_run_id_integration():
8989

9090

9191
def get_commit_run_id_integration(commit):
92-
data = run_json(["gh", "api", f"repos/databricks/cli/commits/{commit}/status"])
93-
items = data.get("statuses")
94-
return get_run_id_from_items(items, "target_url", DECO_TESTS_PREFIX, data)
92+
data = run_json(["gh", "api", f"repos/{CLI_REPO}/commits/{commit}/check-runs"])
93+
items = data.get("check_runs")
94+
return get_run_id_from_items(items, "details_url", DECO_TESTS_PREFIX, data)
9595

9696

9797
def get_pr_run_id_unit():

0 commit comments

Comments
 (0)