MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / IsProtectedBranch

Function IsProtectedBranch

internal/git/git.go:22–24  ·  view source on GitHub ↗

IsProtectedBranch returns true if the branch name is main or master.

(branch string)

Source from the content-addressed store, hash-verified

20
21// IsProtectedBranch returns true if the branch name is main or master.
22func IsProtectedBranch(branch string) bool {
23 return branch == "main" || branch == "master"
24}
25
26// CreateBranch creates a new branch and switches to it.
27func CreateBranch(dir, branchName string) error {

Callers 4

startLoopForPRDMethod · 0.92
GetDiffFunction · 0.85
GetDiffStatsFunction · 0.85
TestIsProtectedBranchFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsProtectedBranchFunction · 0.68