Class AcceptMergeRequestParams

java.lang.Object
org.gitlab4j.api.models.AcceptMergeRequestParams

public class AcceptMergeRequestParams extends Object
  • Constructor Details

    • AcceptMergeRequestParams

      public AcceptMergeRequestParams()
  • Method Details

    • withMergeCommitMessage

      public AcceptMergeRequestParams withMergeCommitMessage(String mergeCommitMessage)
      Custom merge commit message.
      Parameters:
      mergeCommitMessage - Custom merge commit message
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • withMergeWhenPipelineSucceeds

      public AcceptMergeRequestParams withMergeWhenPipelineSucceeds(Boolean mergeWhenPipelineSucceeds)
      If true the MR is merged when the pipeline succeeds.
      Parameters:
      mergeWhenPipelineSucceeds - If true the MR is merged when the pipeline succeeds.
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • withSha

      public AcceptMergeRequestParams withSha(String sha)
      If present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail.
      Parameters:
      sha - If present, then this SHA must match the HEAD of the source branch, otherwise the merge will fail.
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • withShouldRemoveSourceBranch

      public AcceptMergeRequestParams withShouldRemoveSourceBranch(Boolean shouldRemoveSourceBranch)
      If true removes the source branch.
      Parameters:
      shouldRemoveSourceBranch - If true removes the source branch.
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • withSquash

      public AcceptMergeRequestParams withSquash(Boolean squash)
      If true the commits will be squashed into a single commit on merge.
      Parameters:
      squash - If true the commits will be squashed into a single commit on merge.
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • withSquashCommitMessage

      public AcceptMergeRequestParams withSquashCommitMessage(String squashCommitMessage)
      Custom squash commit message.
      Parameters:
      squashCommitMessage - Custom squash commit message.
      Returns:
      The reference to this AcceptMergeRequestParams instance.
    • getForm

      public GitLabApiForm getForm()
      Get the form params specified by this instance.
      Returns:
      a GitLabApiForm instance holding the form parameters for this AcceptMergeRequestParams instance