[FIX][runbot_prebuild] Fix loop of check_new_commit function