// Path: src/main/java/com/dabsquared/gitlabjenkins/cause/GitLabWebHookCause.java
// @ExportedBean
// public class GitLabWebHookCause extends SCMTrigger.SCMTriggerCause {
// 
//     private final CauseData data;
// 
//     public GitLabWebHookCause(CauseData data) {
//         super("");
//         this.data = Objects.requireNonNull(data, "data must not be null");
//     }
// 
//     @Exported
//     public CauseData getData() {
//         return data;
//     }
// 
//     @Override
//     public String getShortDescription() {
//         return data.getShortDescription();
//     }
// }
// 
// Path: src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/GitLabClient.java
// public interface GitLabClient {
//     String getHostUrl();
// 
//     Project createProject(String projectName);
// 
//     MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title);
// 
//     Project getProject(String projectName);
// 
//     Project updateProject(String projectId, String name, String path);
// 
//     void deleteProject(String projectId);
// 
//     void addProjectHook(String projectId, String url, Boolean pushEvents, Boolean mergeRequestEvents, Boolean noteEvents);
// 
//     void changeBuildStatus(String projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description);
// 
//     void changeBuildStatus(Integer projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description);
// 
//     void getCommit(String projectId, String sha);
// 
//     void acceptMergeRequest(MergeRequest mr, String mergeCommitMessage, Boolean shouldRemoveSourceBranch);
// 
//     void createMergeRequestNote(MergeRequest mr, String body);
// 
//     List<Awardable> getMergeRequestEmoji(MergeRequest mr);
// 
//     void awardMergeRequestEmoji(MergeRequest mr, String name);
// 
//     void deleteMergeRequestEmoji(MergeRequest mr, Integer awardId);
// 
//     List<MergeRequest> getMergeRequests(String projectId, State state, int page, int perPage);
// 
//     List<Branch> getBranches(String projectId);
// 
//     Branch getBranch(String projectId, String branch);
// 
//     User getCurrentUser();
// 
//     User addUser(String email, String username, String name, String password);
// 
//     User updateUser(String userId, String email, String username, String name, String password);
// 
//     List<Label> getLabels(String projectId);
// 
//     List<Pipeline> getPipelines(String projectName);
// }


import static com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty.getClient;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.WebApplicationException;
import org.apache.commons.lang.StringUtils;
import org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution;
import org.jenkinsci.plugins.workflow.steps.Step;
import org.jenkinsci.plugins.workflow.steps.StepContext;
import org.jenkinsci.plugins.workflow.steps.StepDescriptor;
import org.jenkinsci.plugins.workflow.steps.StepExecution;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.export.ExportedBean;
import com.dabsquared.gitlabjenkins.cause.GitLabWebHookCause;
import com.dabsquared.gitlabjenkins.gitlab.api.GitLabClient;
import com.dabsquared.gitlabjenkins.gitlab.api.model.MergeRequest;
import hudson.Extension;
import hudson.model.Run;
import hudson.model.TaskListener;
            }
            return null;
        }

        private void println(String message) {
            TaskListener listener = getTaskListener();
            if (listener == null) {
                LOGGER.log(Level.FINE, "failed to print message {0} due to null TaskListener", message);
            } else {
                listener.getLogger().println(message);
            }
        }

        private void printf(String message, Object... args) {
            TaskListener listener = getTaskListener();
            if (listener == null) {
                LOGGER.log(Level.FINE, "failed to print message {0} due to null TaskListener", String.format(message, args));
            } else {
                listener.getLogger().printf(message, args);
            }
        }

        private TaskListener getTaskListener() {
            StepContext context = getContext();
            if (!context.isReady()) {
                return null;
            }
            try {
                return context.get(TaskListener.class);
            } catch (Exception x) {
// Path: src/main/java/com/dabsquared/gitlabjenkins/cause/GitLabWebHookCause.java
// @ExportedBean
// public class GitLabWebHookCause extends SCMTrigger.SCMTriggerCause {
// 
//     private final CauseData data;
// 
//     public GitLabWebHookCause(CauseData data) {
//         super("");
//         this.data = Objects.requireNonNull(data, "data must not be null");
//     }
// 
//     @Exported
//     public CauseData getData() {
//         return data;
//     }
// 
//     @Override
//     public String getShortDescription() {
//         return data.getShortDescription();
//     }
// }
// 
// Path: src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/GitLabClient.java
// public interface GitLabClient {
//     String getHostUrl();
// 
//     Project createProject(String projectName);
// 
//     MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title);
// 
//     Project getProject(String projectName);
// 
//     Project updateProject(String projectId, String name, String path);
// 
//     void deleteProject(String projectId);
// 
//     void addProjectHook(String projectId, String url, Boolean pushEvents, Boolean mergeRequestEvents, Boolean noteEvents);
// 
//     void changeBuildStatus(String projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description);
// 
//     void changeBuildStatus(Integer projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description);
// 
//     void getCommit(String projectId, String sha);
// 
//     void acceptMergeRequest(MergeRequest mr, String mergeCommitMessage, Boolean shouldRemoveSourceBranch);
// 
//     void createMergeRequestNote(MergeRequest mr, String body);
// 
//     List<Awardable> getMergeRequestEmoji(MergeRequest mr);
// 
//     void awardMergeRequestEmoji(MergeRequest mr, String name);
// 
//     void deleteMergeRequestEmoji(MergeRequest mr, Integer awardId);
// 
//     List<MergeRequest> getMergeRequests(String projectId, State state, int page, int perPage);
// 
//     List<Branch> getBranches(String projectId);
// 
//     Branch getBranch(String projectId, String branch);
// 
//     User getCurrentUser();
// 
//     User addUser(String email, String username, String name, String password);
// 
//     User updateUser(String userId, String email, String username, String name, String password);
// 
//     List<Label> getLabels(String projectId);
// 
//     List<Pipeline> getPipelines(String projectName);
// }


// Path: src/main/java/com/dabsquared/gitlabjenkins/workflow/AddGitLabMergeRequestCommentStep.java
import static com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty.getClient;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.WebApplicationException;
import org.apache.commons.lang.StringUtils;
import org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution;
import org.jenkinsci.plugins.workflow.steps.Step;
import org.jenkinsci.plugins.workflow.steps.StepContext;
import org.jenkinsci.plugins.workflow.steps.StepDescriptor;
import org.jenkinsci.plugins.workflow.steps.StepExecution;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.export.ExportedBean;
import com.dabsquared.gitlabjenkins.cause.GitLabWebHookCause;
import com.dabsquared.gitlabjenkins.gitlab.api.GitLabClient;
import com.dabsquared.gitlabjenkins.gitlab.api.model.MergeRequest;
import hudson.Extension;
import hudson.model.Run;
import hudson.model.TaskListener;

            }
            return null;
        }

        private void println(String message) {
            TaskListener listener = getTaskListener();
            if (listener == null) {
                LOGGER.log(Level.FINE, "failed to print message {0} due to null TaskListener", message);
            } else {
                listener.getLogger().println(message);
            }
        }

        private void printf(String message, Object... args) {
            TaskListener listener = getTaskListener();
            if (listener == null) {
                LOGGER.log(Level.FINE, "failed to print message {0} due to null TaskListener", String.format(message, args));
            } else {
                listener.getLogger().printf(message, args);
            }
        }

        private TaskListener getTaskListener() {
            StepContext context = getContext();
            if (!context.isReady()) {
                return null;
            }
            try {
                return context.get(TaskListener.class);
            } catch (Exception x) {
                return null;