diff mbox series

[yocto-autobuilder2] yocto_console_view: Show branch names instead of build caption

Message ID 20251205-mathieu-console-link-names-v1-1-3827363bf8f5@bootlin.com
State New
Headers show
Series [yocto-autobuilder2] yocto_console_view: Show branch names instead of build caption | expand

Commit Message

Mathieu Dubois-Briand Dec. 5, 2025, 9:46 a.m. UTC
Build caption is set to oe-core build branch by yocto-autobuilder-helper
scripts. Today we are using this caption to describe all branches on the
console view, but some repos might use other branches.

Explicitly use oe-core and bitbake branch names instead.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 yocto_console_view/src/views/ConsoleView/ConsoleView.tsx       | 10 +++++++++-
 .../src/views/ConsoleView/YoctoChangeDetails.tsx               |  4 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)


---
base-commit: e8c4db23afb334de278f3c5c7800c33fe32f7438
change-id: 20251205-mathieu-console-link-names-3cf3439e857e

Best regards,
diff mbox series

Patch

diff --git a/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx b/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
index 14276ce92da9..28bfca376f54 100644
--- a/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
+++ b/yocto_console_view/src/views/ConsoleView/ConsoleView.tsx
@@ -138,6 +138,8 @@  function resolveFakeChange(revision: string, whenTimestamp: number, comment: str
       poky_revision: revision,
       oecore_revision: null,
       bitbake_revision: null,
+      oecore_branch: null,
+      bitbake_branch: null,
       poky_revlink: null,
       oecore_revlink: null,
       bitbake_revlink: null,
@@ -253,6 +255,12 @@  function selectChangeForBuild(build: Build, buildset: Buildset,
         change.change.publishurl = change.change.publishurl.replace("/srv/autobuilder/autobuilder.yocto.io/", "https://autobuilder.yocto.io/");
         change.change.publishurl = change.change.publishurl.replace("/srv/autobuilder/valkyrie.yocto.io/", "https://valkyrie.yocto.io/");
       }
+      if ('branch_oecore' in build.properties) {
+        change.change.oecore_branch = build.properties['branch_oecore'][0];
+      }
+      if ('branch_bitbake' in build.properties) {
+        change.change.bitbake_branch = build.properties['branch_bitbake'][0];
+      }
     }
 
     return change;
@@ -299,7 +307,7 @@  export const ConsoleView = observer(() => {
   const buildsQuery = useDataApiQuery(() => Build.getAll(accessor, {query: {
       limit: buildFetchLimit,
       order: '-started_at',
-      property: ["yp_build_revision", "yp_build_branch", "repo_poky", "repo_oecore", "commit_oecore", "repo_bitbake", "commit_bitbake", "reason", "publish_destination", "use_bitbake_setup"],
+      property: ["yp_build_revision", "yp_build_branch", "repo_poky", "repo_oecore", "commit_oecore", "branch_oecore", "repo_bitbake", "commit_bitbake", "branch_bitbake", "reason", "publish_destination", "use_bitbake_setup"],
     }}));
 
   const windowSize = useWindowSize()
diff --git a/yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.tsx b/yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.tsx
index 18a74cf17003..f703b44a5530 100644
--- a/yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.tsx
+++ b/yocto_console_view/src/views/ConsoleView/YoctoChangeDetails.tsx
@@ -137,12 +137,12 @@  export const YoctoChangeDetails = observer(({change, compact, showDetails, setSh
               change.poky_revlink
               ? <a href={change.poky_revlink}>{change.caption} (poky)</a>
               : change.oecore_revlink
-                ? <a href={change.oecore_revlink}>{change.caption} (oe-core)</a>
+                ? <a href={change.oecore_revlink}>{change.oecore_branch ? change.oecore_branch : change.caption} (oe-core)</a>
                : <span>{change.caption}</span>
             }
             {
               change.bitbake_revlink
-              ? <a href={change.bitbake_revlink}>{change.caption} (bitbake)</a>
+              ? <a href={change.bitbake_revlink}>{change.bitbake_branch ? change.bitbake_branch : change.caption} (bitbake)</a>
               : <></>
             }
             {