From 35c0ca2406f0d6d373cfbe324b7cf58beededca9 Mon Sep 17 00:00:00 2001 From: Cole Davis Date: Tue, 16 Sep 2025 20:54:07 -0400 Subject: [PATCH] Clean up comments, docstrings --- src/utils/branch-template.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/branch-template.ts b/src/utils/branch-template.ts index 29c9ad6..ed868e5 100644 --- a/src/utils/branch-template.ts +++ b/src/utils/branch-template.ts @@ -79,7 +79,7 @@ export function createBranchTemplateVariables( } /** - * Generates a branch name using template or falls back to default format + * Generates a branch name from the provided `template` and set of `variables`. Uses a default format if the template is empty or produces an empty result. */ export function generateBranchName( template: string | undefined, @@ -102,10 +102,9 @@ export function generateBranchName( if (template?.trim()) { const branchName = applyBranchTemplate(template, variables); - // Return generated name if non-empty + // Some templates could produce empty results- validate if (branchName.trim().length > 0) return branchName; - // Log fallback when custom template produces empty result console.log( `Branch template '${template}' generated empty result, falling back to default format`, );