From cc79f3ebcd17ea5e7be9dca9233786de30b4e30d Mon Sep 17 00:00:00 2001 From: jenkins Date: Tue, 21 Apr 2026 11:08:59 -0300 Subject: [PATCH] ci(titan-iac): include primary branch in quality metrics --- ci/scripts/publish_test_metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/scripts/publish_test_metrics.py b/ci/scripts/publish_test_metrics.py index 214f0212..662653c7 100644 --- a/ci/scripts/publish_test_metrics.py +++ b/ci/scripts/publish_test_metrics.py @@ -246,7 +246,9 @@ def main() -> int: junit_glob = os.getenv("JUNIT_GLOB", os.getenv("JUNIT_PATH", "build/junit-*.xml")) exit_code_path = os.getenv("QUALITY_GATE_EXIT_CODE_PATH", os.getenv("GLUE_EXIT_CODE_PATH", "build/quality-gate.rc")) summary_path = os.getenv("QUALITY_GATE_SUMMARY_PATH", "build/quality-gate-summary.json") - branch = os.getenv("BRANCH_NAME", os.getenv("GIT_BRANCH", "")) + 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", "") tests = _collect_junit_totals(junit_glob)