Skip to main content

Practice ยท 3 of 3

Stale Branch Report

Given branches โ€” array of { name, ageDays, ahead } (ahead = commits main doesn't have) โ€” write staleReport(branches): return names of branches that are stale, where stale = ageDays > 14 AND ahead > 5. Sort alphabetically. This is the exact check a bot runs on real repos.

Difficulty: intermediate

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