repository.setDefaultBranch(defaultBranch);
}
if (!project.name.equals(updatedProject.name)) {
if (!repository.renameTo(updatedProject.name)) {
throw new FileOperationException("fail repository rename to " + project.owner + "/" + updatedProject.name);
}
}
updatedProject.update();