bootstrap: extract method resolveCommit()
bootstrap: extract method resolveCommit()

Creates opportunities for idiomatic Go early-returns instead of nested
indentation.

buildkite/agent,buildkite/agent,buildkite/agent