I don't think this is how GitHub does it.  If you run the same hash through the build system then the latest build message is shown even if the build now failed.