From 9fe967240ef720806efeeaa64159adc78b8739dd Mon Sep 17 00:00:00 2001 From: codex Date: Tue, 21 Apr 2026 11:08:21 -0300 Subject: [PATCH] ci(metis): include primary branch in quality metrics --- scripts/publish_test_metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/publish_test_metrics.py b/scripts/publish_test_metrics.py index 12ebbe3..7112991 100644 --- a/scripts/publish_test_metrics.py +++ b/scripts/publish_test_metrics.py @@ -206,7 +206,9 @@ def main() -> int: "PUSHGATEWAY_URL", "http://platform-quality-gateway.monitoring.svc.cluster.local:9091" ).strip() suite = os.getenv("SUITE_NAME", "metis") - 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", "") strict = os.getenv("METRICS_STRICT", "") == "1"