DashboardcraftgetRevisionBranchName detached SHA fall…

getRevisionBranchName detached SHA fallback

Category: gotcha
Confidence: 1.00
ID: 01a081f4-8f19-7aa3-88a4-db0ff5935751
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 1bnaiQoZ3c3e1xzbG
Created: 2026-09-08 16:58:03
Updated: 2026-09-08 16:58:03

Content

Trap: git name-rev --name-only --no-undefined <sha> looks required before checkout because named release branches are preferred, but a CI-approved detached SHA has no name and must remain publishable. Fix: getRevisionBranchName() catches the lookup failure and returns ''; publishMain() checks out branchName || rev. This preserves named-ref behavior while allowing exact immutable CI revisions.

Move to: