# PR#901: build status badge ## The Problem A README cannot show whether the latest build of a branch is green. ## The Scenarios ### Feature: status badge per branch #### Scenario#901.01: The badge of a green branch is green So that a README shows the build state at a glance. - **Given** a branch `main` whose latest build succeeded - **When** `GET /branches/main/badge.svg` is requested - **Then** a green SVG badge is served - **and** it is served with `no-store` cache headers. ##### Verified by - [BadgeControllerTest](../../src/test/kotlin/BadgeControllerTest.kt) ### Feature: badges for unknown branches #### Scenario#901.02: An unknown branch gets a grey badge - **Given** no branch `nope` - **When** `GET /branches/nope/badge.svg` is requested - **Then** a grey badge with the text "unknown" is served ##### Verified by - [BadgeControllerTest](../../src/test/kotlin/BadgeControllerTest.kt) ## The Solution ~~~markdown ### Feature: inside a tilde fence ~~~ A new controller renders the SVG.