Class RevertCommandParameters


public class RevertCommandParameters extends AbstractCommandParameters
Parameters to perform a revert operation.
Since:
8.13
  • Method Details

    • getBranch

      @Nonnull public Branch getBranch()
      The tip of the branch that will be used as the parent of the revert commit.

      This branch will also be the target branch if the target branch is not provided (i.e. the revert commit will be created on this branch).

      Returns:
      branch used as the parent of the revert commit
    • getCommitId

      @Nonnull public String getCommitId()
      Returns:
      the ID of the commit to be reverted
    • getCommitter

      @Nonnull public ApplicationUser getCommitter()
      Returns:
      the committer of the revert commit.
    • getMergedCommitParentNumber

      @Nonnull public Optional<Integer> getMergedCommitParentNumber()
      Returns:
      parent number of the merge commit to be considered for reverting, if the commit is a merge commit, otherwise Optional.empty().
    • getTargetBranch

      @Nonnull public Optional<String> getTargetBranch()
      The branch that the revert commit will be created on.

      If target branch is Optional.empty() then getBranch() will be used as the target branch.

      Returns:
      the branch to create the revert commit on