public String getShaForBranch(String branch) {
GitBranch gitBranch = new GitBranch(branch);
if (gitBranch.isPullRequest()) {
try {
return getGithubRepository().getPullRequest(gitBranch.pullRequestNumber()).getHead().getSha();
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
try {