From 15daef173d242b817465f79ae6cbb36e33ca993b Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Sat, 12 Sep 2026 15:40:03 +0530 Subject: [PATCH 01/12] ci: support dynamic branch-aware documentation links in dashboard --- docs/index.rst | 4 +-- docs/integration_process/reference.rst | 2 +- .../cli/misc/assets/report_template.html | 4 +-- scripts/tooling/cli/misc/html_report.py | 27 +++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 01ca8ab0721..4d3549ad050 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -58,7 +58,7 @@ documentation set that downstream product distributions can build on. Reference Integration workflow and health overview with links to :doc:`Integration Process ` and - `Integration Status `_. + `Integration Status `_. .. grid-item-card:: 🧩 Modules :link: modules/index @@ -77,7 +77,7 @@ documentation set that downstream product distributions can build on. Modules Verification Reports - Integration Status + Integration Status S-Core v1.0 Releases Integration Process diff --git a/docs/integration_process/reference.rst b/docs/integration_process/reference.rst index e23011075e9..75a31518c1d 100644 --- a/docs/integration_process/reference.rst +++ b/docs/integration_process/reference.rst @@ -145,4 +145,4 @@ The consolidated outputs published by the integration. They are built by - `docs/s_core_v_1/roadmap/overall_status.rst `_ * - Integration status dashboard - Live build/health overview of the integration. - - `status_dashboard.html `_ + - `status_dashboard.html <../status_dashboard.html>`_ diff --git a/scripts/tooling/cli/misc/assets/report_template.html b/scripts/tooling/cli/misc/assets/report_template.html index 7391a635873..60e36f723c3 100644 --- a/scripts/tooling/cli/misc/assets/report_template.html +++ b/scripts/tooling/cli/misc/assets/report_template.html @@ -384,7 +384,7 @@

Requirements & Architecture @@ -449,7 +449,7 @@

Tool Qualification (ISO 262

Static Analysis & Code Quality

diff --git a/scripts/tooling/cli/misc/html_report.py b/scripts/tooling/cli/misc/html_report.py index b5dd576617a..81f8e9fb580 100644 --- a/scripts/tooling/cli/misc/html_report.py +++ b/scripts/tooling/cli/misc/html_report.py @@ -128,6 +128,30 @@ def _parse_sbom_packages(sbom_path: Path) -> list[dict[str, Any]]: return packages +def _get_current_branch() -> str: + # 1. Try GITHUB_REF_NAME environment variable (standard in GitHub Actions) + ref_name = os.environ.get("GITHUB_REF_NAME") + if ref_name: + return ref_name + # 2. Try running git command to get current branch + import subprocess + try: + result = subprocess.run( + ["git", "rev-parse", "--abbrev-ref", "HEAD"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + check=True + ) + branch = result.stdout.strip() + if branch and branch != "HEAD": + return branch + except Exception: + pass + # 3. Default to main + return "main" + + def generate_report( known_good: KnownGood, token: str | None = None, @@ -137,6 +161,8 @@ def generate_report( if token: _enrich_with_compare_data(entries, token) + branch = _get_current_branch() + env = Environment( loader=FileSystemLoader(TEMPLATE_DIR), autoescape=select_autoescape(["html"]), @@ -146,6 +172,7 @@ def generate_report( modules_json=json.dumps(entries, indent=2), sbom_packages_json=json.dumps(sbom_packages or [], indent=2), timestamp=known_good.timestamp, + branch=branch, ) From 54c1c3cb230c465ca9bf16affdeffd4089898407 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Sat, 12 Sep 2026 15:52:29 +0530 Subject: [PATCH 02/12] ci: fix python styling format issue --- scripts/tooling/cli/misc/html_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tooling/cli/misc/html_report.py b/scripts/tooling/cli/misc/html_report.py index 81f8e9fb580..2df929ab38f 100644 --- a/scripts/tooling/cli/misc/html_report.py +++ b/scripts/tooling/cli/misc/html_report.py @@ -135,13 +135,14 @@ def _get_current_branch() -> str: return ref_name # 2. Try running git command to get current branch import subprocess + try: result = subprocess.run( ["git", "rev-parse", "--abbrev-ref", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, - check=True + check=True, ) branch = result.stdout.strip() if branch and branch != "HEAD": From 2373e3c78dd31633c6e570a88d33f3381a019a85 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Sat, 12 Sep 2026 16:04:13 +0530 Subject: [PATCH 03/12] docs: use absolute link for toctree in index.rst --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 4d3549ad050..8ea2de0e6fd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,7 +77,7 @@ documentation set that downstream product distributions can build on. Modules Verification Reports - Integration Status + Integration Status S-Core v1.0 Releases Integration Process From 9c498299c07c68405cfe2f3d8cc1cc979d46a725 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 14 Sep 2026 16:30:15 +0530 Subject: [PATCH 04/12] ci: resolve PR review comments for branch-aware dashboard links - Update docs/index.rst toctree to use a relative path with the '#http://' dummy anchor hack to bypass Sphinx validation while maintaining local resolution. - Modify _get_current_branch() in scripts/tooling/cli/misc/html_report.py to prefer GITHUB_HEAD_REF first to support pull_request_target workflows. - Add GITHUB_HEAD_REF and GITHUB_REF_NAME branch-selection unit tests to scripts/tooling/tests/test_report.py. --- docs/index.rst | 2 +- scripts/tooling/cli/misc/html_report.py | 4 ++-- scripts/tooling/tests/test_report.py | 26 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 8ea2de0e6fd..8b439258b3f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,7 +77,7 @@ documentation set that downstream product distributions can build on. Modules Verification Reports - Integration Status + Integration Status S-Core v1.0 Releases Integration Process diff --git a/scripts/tooling/cli/misc/html_report.py b/scripts/tooling/cli/misc/html_report.py index 2df929ab38f..2c5f359c05e 100644 --- a/scripts/tooling/cli/misc/html_report.py +++ b/scripts/tooling/cli/misc/html_report.py @@ -129,8 +129,8 @@ def _parse_sbom_packages(sbom_path: Path) -> list[dict[str, Any]]: def _get_current_branch() -> str: - # 1. Try GITHUB_REF_NAME environment variable (standard in GitHub Actions) - ref_name = os.environ.get("GITHUB_REF_NAME") + # 1. Prefer the pull request head branch, then the standard GitHub Actions ref name + ref_name = os.environ.get("GITHUB_HEAD_REF") or os.environ.get("GITHUB_REF_NAME") if ref_name: return ref_name # 2. Try running git command to get current branch diff --git a/scripts/tooling/tests/test_report.py b/scripts/tooling/tests/test_report.py index 945bc48c8a6..b9c7020fa6c 100644 --- a/scripts/tooling/tests/test_report.py +++ b/scripts/tooling/tests/test_report.py @@ -219,6 +219,32 @@ def test_creates_parent_dirs_via_path(self, tmp_path, minimal_known_good): assert out.exists() +# --------------------------------------------------------------------------- +# generate_report – branch selection and environment variable overrides +# --------------------------------------------------------------------------- + + +class TestGenerateReportBranchSelection: + def test_prefers_github_head_ref(self, monkeypatch, minimal_known_good): + monkeypatch.setenv("GITHUB_HEAD_REF", "feature/my-head-branch") + monkeypatch.setenv("GITHUB_REF_NAME", "main") + html = generate_report(minimal_known_good, TEMPLATE_DIR) + assert "https://eclipse-score.github.io/score/feature/my-head-branch/" in html + + def test_falls_back_to_github_ref_name(self, monkeypatch, minimal_known_good): + monkeypatch.delenv("GITHUB_HEAD_REF", raising=False) + monkeypatch.setenv("GITHUB_REF_NAME", "releases/v1.0") + html = generate_report(minimal_known_good, TEMPLATE_DIR) + assert "https://eclipse-score.github.io/score/releases/v1.0/" in html + + def test_falls_back_to_git_or_main_when_no_env(self, monkeypatch, minimal_known_good): + monkeypatch.delenv("GITHUB_HEAD_REF", raising=False) + monkeypatch.delenv("GITHUB_REF_NAME", raising=False) + html = generate_report(minimal_known_good, TEMPLATE_DIR) + # Verify it falls back to either current git branch or "main" + assert "https://eclipse-score.github.io/score/feature/dashboard-branch-links/" in html or "https://eclipse-score.github.io/score/main/" in html + + # --------------------------------------------------------------------------- # Integration: real known_good.json # --------------------------------------------------------------------------- From dd9c25316f7da673687f5c2e740fa7d129e899f1 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 21 Sep 2026 16:29:38 +0530 Subject: [PATCH 05/12] refactor: organize imports in html_report.py Move the subprocess import to the top of the file to comply with standard PEP 8 import style and avoid nested/deferred imports in _get_current_branch(). --- scripts/tooling/cli/misc/html_report.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/tooling/cli/misc/html_report.py b/scripts/tooling/cli/misc/html_report.py index 2c5f359c05e..fbe373d0cbd 100644 --- a/scripts/tooling/cli/misc/html_report.py +++ b/scripts/tooling/cli/misc/html_report.py @@ -16,6 +16,7 @@ import json import logging import os +import subprocess import sys from pathlib import Path from typing import Any, Optional @@ -134,8 +135,6 @@ def _get_current_branch() -> str: if ref_name: return ref_name # 2. Try running git command to get current branch - import subprocess - try: result = subprocess.run( ["git", "rev-parse", "--abbrev-ref", "HEAD"], From 9be8870bffcec82b7a72e6ff7426850c221c5fa9 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 21 Sep 2026 17:03:45 +0530 Subject: [PATCH 06/12] ci: resolve UP022 formatting check violation in html_report.py Replace direct `stdout` and `stderr` PIPE redirection with `capture_output=True` in `subprocess.run` to comply with the pyupgrade / ruff ruleset. --- scripts/tooling/cli/misc/html_report.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/tooling/cli/misc/html_report.py b/scripts/tooling/cli/misc/html_report.py index fbe373d0cbd..821254a6682 100644 --- a/scripts/tooling/cli/misc/html_report.py +++ b/scripts/tooling/cli/misc/html_report.py @@ -138,8 +138,7 @@ def _get_current_branch() -> str: try: result = subprocess.run( ["git", "rev-parse", "--abbrev-ref", "HEAD"], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + capture_output=True, text=True, check=True, ) From 51708fc750f28ec3f241d88be2fe33916cbd2e41 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 21 Sep 2026 17:32:20 +0530 Subject: [PATCH 07/12] test: format long assertion line in test_report.py Format a long assertion line to comply with the line-length limits (120 chars) specified in pyproject.toml. --- scripts/tooling/tests/test_report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tooling/tests/test_report.py b/scripts/tooling/tests/test_report.py index b9c7020fa6c..9a6dd761bad 100644 --- a/scripts/tooling/tests/test_report.py +++ b/scripts/tooling/tests/test_report.py @@ -242,7 +242,10 @@ def test_falls_back_to_git_or_main_when_no_env(self, monkeypatch, minimal_known_ monkeypatch.delenv("GITHUB_REF_NAME", raising=False) html = generate_report(minimal_known_good, TEMPLATE_DIR) # Verify it falls back to either current git branch or "main" - assert "https://eclipse-score.github.io/score/feature/dashboard-branch-links/" in html or "https://eclipse-score.github.io/score/main/" in html + assert ( + "https://eclipse-score.github.io/score/feature/dashboard-branch-links/" in html + or "https://eclipse-score.github.io/score/main/" in html + ) # --------------------------------------------------------------------------- From 59ecc9f0e429913967e8528bb81ae5558c9a4bec Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 21 Sep 2026 19:26:25 +0530 Subject: [PATCH 08/12] fix: update integration status link in documentation --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 8b439258b3f..4d3549ad050 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,7 +77,7 @@ documentation set that downstream product distributions can build on. Modules Verification Reports - Integration Status + Integration Status S-Core v1.0 Releases Integration Process From a9532d007c2181e1458fa41a065b80ab73e09998 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Mon, 21 Sep 2026 19:44:16 +0530 Subject: [PATCH 09/12] fix: remove outdated integration status link from documentation --- docs/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 4d3549ad050..cdc4fc78630 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,7 +77,6 @@ documentation set that downstream product distributions can build on. Modules Verification Reports - Integration Status S-Core v1.0 Releases Integration Process From b4f1efb98dba3c51bd6be56e3fc984a30a8cfc42 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Tue, 22 Sep 2026 12:03:50 +0530 Subject: [PATCH 10/12] docs: add Sphinx-compliant status dashboard page placeholder Create docs/status_dashboard.rst and add it to the docs/index.rst toctree to resolve previous build validation issues while keeping a proper integration status link. --- docs/index.rst | 1 + docs/status_dashboard.rst | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 docs/status_dashboard.rst diff --git a/docs/index.rst b/docs/index.rst index cdc4fc78630..b0a2ad2c1a5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,6 +77,7 @@ documentation set that downstream product distributions can build on. Modules Verification Reports + Integration Status S-Core v1.0 Releases Integration Process diff --git a/docs/status_dashboard.rst b/docs/status_dashboard.rst new file mode 100644 index 00000000000..4ddbb7dd2b6 --- /dev/null +++ b/docs/status_dashboard.rst @@ -0,0 +1,4 @@ +Integration Status +================== + +The generated integration status dashboard is published at this location. \ No newline at end of file From ec46df7fa90ebcc99d4efd7801f0777bae121a72 Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Tue, 22 Sep 2026 12:41:59 +0530 Subject: [PATCH 11/12] docs: add copyright and license headers to status_dashboard.rst --- docs/status_dashboard.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/status_dashboard.rst b/docs/status_dashboard.rst index 4ddbb7dd2b6..c11d8a19871 100644 --- a/docs/status_dashboard.rst +++ b/docs/status_dashboard.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Integration Status ================== From 75531163bd96fa54c391c5a0f4be40b4ce815dbf Mon Sep 17 00:00:00 2001 From: Srinivasu K Date: Tue, 22 Sep 2026 14:30:53 +0530 Subject: [PATCH 12/12] docs: fix Sphinx syntax warning in status_dashboard.rst Add a blank line after the copyright header block to resolve a docutils markup syntax error and prevent the CI preflight documentation build from failing. --- docs/status_dashboard.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/status_dashboard.rst b/docs/status_dashboard.rst index c11d8a19871..7e494115ed4 100644 --- a/docs/status_dashboard.rst +++ b/docs/status_dashboard.rst @@ -11,6 +11,7 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* + Integration Status ==================