From 8d9e969f2e1a38fa442798dd6851bbbbd3b9176d Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Mon, 23 Mar 2026 13:00:02 -0700 Subject: [PATCH] fix(oven): resolve git ref for manual build triggers Manual POST /native-build without a ref now resolves HEAD from the oven git repo so build name and commit message display correctly. Co-Authored-By: Claude Opus 4.6 (1M context) --- oven/native-builder.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oven/native-builder.mjs b/oven/native-builder.mjs index 49193ff0d0..38833f1178 100644 --- a/oven/native-builder.mjs +++ b/oven/native-builder.mjs @@ -205,6 +205,13 @@ async function runBuildJob(job) { job.percent = 0; const repoDir = path.resolve(NATIVE_DIR, "../.."); + + // Resolve ref from git HEAD if manual trigger didn't provide one + if (!job.ref || job.ref === "unknown") { + const headRef = await runSync("git", ["rev-parse", "HEAD"], repoDir); + if (headRef) job.ref = headRef; + } + const buildName = await runSync("bash", ["scripts/build-name.sh"], NATIVE_DIR) || `oven-${job.ref.slice(0, 7)}`; const commitMsg = await runSync("git", ["log", "-1", "--format=%s", job.ref], repoDir) || ""; job.buildName = buildName; -- 2.51.2