MCPcopy Create free account
hub / github.com/effect-app/libs / parseDefaultBranch

Function parseDefaultBranch

packages/cli/src/sync-effect-app-subtree.ts:63–73  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

61}
62
63const parseDefaultBranch = (source: string) => {
64 const line = source
65 .split("\n")
66 .find((line) => line.startsWith("ref: refs/heads/") && line.endsWith("\tHEAD"))
67
68 if (!line) {
69 throw new Error("Could not resolve default branch for effect-app libs repository")
70 }
71
72 return line.slice("ref: refs/heads/".length, -"\tHEAD".length)
73}
74
75const selectVersionMentions = (mentions: Arr.NonEmptyArray<VersionMention>) => {
76 for (const packageName of packagePreference) {

Callers 1

Calls 1

splitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…