Address code review feedback - add logging and constant for virtual branches

Co-authored-by: eliandoran <21236836+eliandoran@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-02 22:00:54 +00:00
parent 7cdd8ffbe2
commit 5b8bb8587d
2 changed files with 9 additions and 2 deletions

View File

@@ -278,18 +278,22 @@ function setPrefixBatch(req: Request) {
}
const normalizedPrefix = utils.isEmptyOrWhitespace(prefix) ? null : prefix;
let updatedCount = 0;
for (const branchId of branchIds) {
const branch = becca.getBranch(branchId);
if (branch) {
branch.prefix = normalizedPrefix;
branch.save();
updatedCount++;
} else {
log.info(`Branch ${branchId} not found, skipping prefix update`);
}
}
return {
success: true,
count: branchIds.length
count: updatedCount
};
}