Practice ยท 2 of 3
Flow Validator
A GitHub Flow session is a list of events: "branch", "commit", "push", "pr", "merge". Write validateFlow(events) returning true only for a valid session: starts with exactly one "branch", at least one "commit" and "push" before the "pr", exactly one "pr", and "merge" last (if present). Order violations => false.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Branch Naming & Flow โ Practice