MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / detectReleaseBranch

Function detectReleaseBranch

packages/bumpy/src/core/channels.ts:80–87  ·  view source on GitHub ↗
(rootDir: string)

Source from the content-addressed store, hash-verified

78 * In GitHub Actions push events, HEAD is often detached — prefer GITHUB_REF_NAME.
79 */
80export function detectReleaseBranch(rootDir: string): string | null {
81 const refName = process.env.GITHUB_REF_NAME;
82 const refType = process.env.GITHUB_REF_TYPE;
83 if (refName && refType !== 'tag') return refName;
84 const branch = getCurrentBranch({ cwd: rootDir });
85 if (!branch || branch === 'HEAD') return null; // detached HEAD with no env hint
86 return branch;
87}
88
89/** Find the channel matching a branch name, if any */
90export function matchChannelByBranch(config: BumpyConfig, branch: string | null): ResolvedChannel | null {

Callers 4

ciPlanCommandFunction · 0.90
ciReleaseCommandFunction · 0.90
checkCommandFunction · 0.85
resolveActiveChannelFunction · 0.85

Calls 1

getCurrentBranchFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…