MCPcopy Index your code
hub / github.com/dmno-dev/bumpy / resolveActiveChannel

Function resolveActiveChannel

packages/bumpy/src/core/channels.ts:103–115  ·  view source on GitHub ↗
(rootDir: string, config: BumpyConfig, override?: string)

Source from the content-addressed store, hash-verified

101 * Throws if an explicit override names an unknown channel.
102 */
103export function resolveActiveChannel(rootDir: string, config: BumpyConfig, override?: string): ResolvedChannel | null {
104 if (override) {
105 const channel = resolveChannels(config).get(override);
106 if (!channel) {
107 const known = channelNames(config);
108 throw new Error(
109 `Unknown channel "${override}"${known.length ? ` — configured channels: ${known.join(', ')}` : ' — no channels are configured in .bumpy/_config.json'}`,
110 );
111 }
112 return channel;
113 }
114 return matchChannelByBranch(config, detectReleaseBranch(rootDir));
115}

Callers 3

statusCommandFunction · 0.90
versionCommandFunction · 0.90
publishCommandFunction · 0.90

Calls 4

resolveChannelsFunction · 0.85
channelNamesFunction · 0.85
matchChannelByBranchFunction · 0.85
detectReleaseBranchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…