use of io.hops.hopsworks.persistence.entity.git.CommitterSignature in project hopsworks by logicalclocks.
the class GitController method commit.
public GitOpExecution commit(CommitCommandConfiguration commitConfigurationDTO, Project project, Users hopsworksUser, Integer repositoryId) throws IllegalArgumentException, GitOpException, HopsSecurityException {
commandConfigurationValidator.verifyCommitOptions(commitConfigurationDTO);
String userFullName = hopsworksUser.getFname() + " " + hopsworksUser.getLname();
GitRepository repository = commandConfigurationValidator.verifyRepository(project, repositoryId);
String repositoryFullPath = inodeController.getPath(repository.getInode());
GitCommandConfiguration commandConfiguration = new GitCommandConfigurationBuilder().setCommandType(GitCommandType.COMMIT).setMessage(commitConfigurationDTO.getMessage()).setFiles(commitConfigurationDTO.getFiles()).setAll(commitConfigurationDTO.isAll()).setCommitter(new CommitterSignature(userFullName, hopsworksUser.getEmail())).setPath(repositoryFullPath).build();
return executionController.createExecution(commandConfiguration, project, hopsworksUser, repository);
}
Aggregations