Skip to main content

Practice ยท 1 of 3

Branch Classifier

Write classifyBranch(name) โ€” branches follow <type>/<kebab-desc> where type โˆˆ feat|fix|chore|docs|refactor|test. Return "feature" for feat/fix branches, "maintenance" for chore/docs/test/refactor, and null for anything malformed (missing slash, bad type, spaces, uppercase).

Difficulty: intermediate

Back to lesson: Practice: Branch Naming & Flow โ€” Practice