All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.bamboo.specs.builders.task.VcsCommitTask Maven / Gradle / Ivy

There is a newer version: 10.2.0
Show newest version
package com.atlassian.bamboo.specs.builders.task;

import com.atlassian.bamboo.specs.model.task.VcsCommitTaskProperties;
import org.jetbrains.annotations.NotNull;

import static com.atlassian.bamboo.specs.api.validators.common.ImporterUtils.checkNotNull;

/**
 * This task will commit all local changes to a repository. For
 * DVCS repositories (which distinguish
 * between local and remote commits) this task will also push the commits to the remote repository.
 */
public class VcsCommitTask extends BaseVcsTask {
    @NotNull
    private String commitMessage;

    /**
     * Sets the message to be used for committing.
     */
    public VcsCommitTask commitMessage(@NotNull String commitMessage) {
        checkNotNull("commitMessage", commitMessage);
        this.commitMessage = commitMessage;
        return this;
    }

    @NotNull
    @Override
    protected VcsCommitTaskProperties build() {
        return new VcsCommitTaskProperties(
                description,
                taskEnabled,
                requirements,
                conditions,
                defaultRepository,
                repository,
                workingSubdirectory,
                commitMessage);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy