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

Function validateBranchName

packages/bumpy/src/commands/ci.ts:60–65  ·  view source on GitHub ↗

Validate a git branch name to prevent injection

(name: string)

Source from the content-addressed store, hash-verified

58
59/** Validate a git branch name to prevent injection */
60function validateBranchName(name: string): string {
61 if (!/^[a-zA-Z0-9_./-]+$/.test(name)) {
62 throw new Error(`Invalid branch name: ${name}`);
63 }
64 return name;
65}
66
67/** Validate a PR number is numeric */
68function validatePrNumber(pr: string): string {

Callers 2

createVersionPrFunction · 0.85
createChannelReleasePrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…