diff --git a/scripts/publish_test_metrics.py b/scripts/publish_test_metrics.py index 5540f91..3e4d122 100644 --- a/scripts/publish_test_metrics.py +++ b/scripts/publish_test_metrics.py @@ -233,7 +233,9 @@ def main() -> int: "PUSHGATEWAY_URL", "http://platform-quality-gateway.monitoring.svc.cluster.local:9091" ).strip() suite = os.getenv("SUITE_NAME", "ariadne") - 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", "")