From ed2ebf266d287d70b8f71387958ffd3aaaebed4c Mon Sep 17 00:00:00 2001 From: jenkins Date: Tue, 21 Apr 2026 11:08:21 -0300 Subject: [PATCH] ci(atlasbot): 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 7741537..8fe38ad 100755 --- a/scripts/publish_test_metrics.py +++ b/scripts/publish_test_metrics.py @@ -225,7 +225,9 @@ def main() -> int: docs_rc_path = Path(os.getenv("QUALITY_GATE_DOCS_RC_PATH", "build/docs-naming.rc")) source_root = Path(os.getenv("SOURCE_ROOT", "atlasbot")) build_dir = Path(os.getenv("BUILD_DIR", "build")) - 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", "") if not junit_path.exists():