Display correct status.

The API may return multiple statuses for a ref, use only the latest state.

All tests passing, but I'm not sure if the code is so great.