Skip to content

Commit f7a5d2e

Browse files
JeevantheDevclaude
andcommitted
fix: always generate preview workflow during onboarding regardless of devBranch
The preview yml was silently skipped when the repo had no branch named "develop" (scan returns developmentBranch: null) and the user didn't explicitly set a development branch during onboarding — causing the initial preview deployment to never trigger. The workflow template already defaults to "develop" when devBranch is null, so the && input.devBranch guard was stricter than needed. Removing it ensures shipbrain-preview.yml is always written during initial setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eba1bd8 commit f7a5d2e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/github/setup.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,10 @@ export function workflowFiles(input: WorkflowInput) {
243243
files[".github/workflows/shipbrain-ci.yml"] = shipbrainCiWorkflowMinimal(input);
244244
}
245245

246-
// Include preview workflow if Cloudflare is enabled and develop branch exists
247-
// Skip if preview workflow already exists (unless force overwrite)
248-
if (input.includeCloudflare && input.devBranch && (force || !input.previewExists)) {
246+
// Always include preview workflow when Cloudflare is enabled.
247+
// devBranch is optional — the template defaults to "develop" when null.
248+
// Skip only if the workflow already exists (unless force overwrite).
249+
if (input.includeCloudflare && (force || !input.previewExists)) {
249250
files[".github/workflows/shipbrain-preview.yml"] = shipbrainPreviewWorkflow(input);
250251
}
251252

0 commit comments

Comments
 (0)