fix: publish v02 code agent bundle commit
This commit is contained in:
@@ -1892,6 +1892,9 @@ function scrub(value) {
|
||||
if (Array.isArray(value)) return value.map(scrub);
|
||||
if (!value || typeof value !== "object") return value;
|
||||
const result = {};
|
||||
const semanticRuntimeCommitEnvNames = new Set([
|
||||
"HWLAB_CODE_AGENT_AGENTRUN_SOURCE_COMMIT"
|
||||
]);
|
||||
for (const [key, child] of Object.entries(value)) {
|
||||
if (key === "hwlab.pikastech.local/source-commit" ||
|
||||
key === "hwlab.pikastech.local/artifact-source-commit" ||
|
||||
@@ -1901,7 +1904,8 @@ function scrub(value) {
|
||||
result[key] = "<runtime-source-identity>";
|
||||
continue;
|
||||
}
|
||||
if (key === "value" && /^HWLAB_.*COMMIT/.test(String(value.name || ""))) {
|
||||
const envName = String(value.name || "");
|
||||
if (key === "value" && /^HWLAB_.*COMMIT/.test(envName) && !semanticRuntimeCommitEnvNames.has(envName)) {
|
||||
result[key] = "<runtime-source-identity>";
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user