Search in sources :

Example 1 with CommitterSignature

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);
}
Also used : GitRepository(io.hops.hopsworks.persistence.entity.git.GitRepository) GitCommandConfiguration(io.hops.hopsworks.persistence.entity.git.config.GitCommandConfiguration) CommitterSignature(io.hops.hopsworks.persistence.entity.git.CommitterSignature)

Aggregations

CommitterSignature (io.hops.hopsworks.persistence.entity.git.CommitterSignature)1 GitRepository (io.hops.hopsworks.persistence.entity.git.GitRepository)1 GitCommandConfiguration (io.hops.hopsworks.persistence.entity.git.config.GitCommandConfiguration)1