I think the previous build query should be delayed until it is needed.

Suggested solution: add a previous_build method which would check e.g. @previous_build_queried variable (to account for previous build being nil) and if not, call set_previous_build, then return @previous_build.