public BuildConfiguration calculateBuildConfiguration(String githubRepoUrl, String sha, EnvVars envVars) throws IOException, InterruptedException, InvalidBuildConfigurationException {
GithubRepositoryService githubRepositoryService = getGithubRepositoryService(githubRepoUrl);
DotCiTemplate dotCiTemplate = new DotCiTemplate();
try {
GHContent file = githubRepositoryService.getGHFile(".ci.yml", sha);
BuildConfiguration configuration = new BuildConfiguration(file.getContent(), envVars);
if (!configuration.isValid()) {
throw new InvalidBuildConfigurationException(configuration.getValidationErrors());
}
if(configuration.getLanguage() == null){
DotCiTemplate defaultParentTemplate = dotCiTemplate.getDefaultFor(githubRepositoryService.getGithubRepository()); //.getBuildConfiguration(envVars);