private void addBuildCauseForNonGithubCauses() {
if (build.getCause(UserIdCause.class) != null) {
String user = build.getCause(UserIdCause.class).getUserId();
String branch = build.getEnvVars().get("BRANCH");
String sha = githubRepositoryService.getShaForBranch(branch);
ManualBuildCause manualCause = new ManualBuildCause(new GitBranch(branch), sha, user);
build.addCause(manualCause);
}
if (build.getCause() == BuildCause.NULL_BUILD_CAUSE) {
String branch = build.getEnvVars().get("BRANCH");
String sha = githubRepositoryService.getShaForBranch(branch);