def head_build_for(room_id, user)
      sha_to_build = GitHub.branch_head_sha(repository.nwo, name)
      return if !sha_to_build

      commit = repository.commit_for_sha(sha_to_build)

      current_sha = current_build ? current_build.sha1 : "#{sha_to_build}^"
      compare_url = repository.github_url("compare/#{current_sha}...#{commit.sha1}")
      build_for(commit, user, room_id, compare_url)
    end
def head_build_for(room_id, user)
      sha_to_build = GitHub.branch_head_sha(repository.nwo, name)
      return if !sha_to_build

      commit = repository.commit_for_sha(sha_to_build)

      current_sha = current_build ? current_build.sha1 : "#{sha_to_build}^"
      compare_url = repository.github_url("compare/#{current_sha}...#{commit.sha1}")
      build_for(commit, user, room_id, compare_url)
    end
Fetch the HEAD commit of this branch using the GitHub API and create a
 build and commit record.

 room_id - See build_for documentation. This is passed as is to the
           build_for method.
 user    - Ditto.

 Returns the newly created Janky::Build.