diff --git a/scripts/publish_test_metrics.py b/scripts/publish_test_metrics.py index c8e2e82..c6d38ee 100755 --- a/scripts/publish_test_metrics.py +++ b/scripts/publish_test_metrics.py @@ -279,7 +279,9 @@ def main() -> int: frontend_rc = _read_test_exit_code(frontend_rc_file) backend_suite_result = "passed" if backend_rc == 0 else "failed" frontend_suite_result = "passed" if frontend_rc == 0 else "failed" - branch = os.getenv("BRANCH_NAME", "") + branch = os.getenv("BRANCH_NAME") or os.getenv("GIT_BRANCH") or "unknown" + if branch.startswith("origin/"): + branch = branch[len("origin/") :] build_number = os.getenv("BUILD_NUMBER", "") commit = os.getenv("GIT_COMMIT", "")