Interface GitLabClient
public interface GitLabClient
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptMergeRequest(MergeRequest mr, String mergeCommitMessage, Boolean shouldRemoveSourceBranch) voidaddProjectHook(String projectId, String url, Boolean pushEvents, Boolean mergeRequestEvents, Boolean noteEvents) voidaddProjectHook(String projectId, String url, String secretToken, Boolean pushEvents, Boolean mergeRequestEvents, Boolean noteEvents) voidawardMergeRequestEmoji(MergeRequest mr, String name) voidchangeBuildStatus(Integer projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description) default voidchangeBuildStatus(Integer projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description, Integer pipelineId) voidchangeBuildStatus(String projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description) default voidchangeBuildStatus(String projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description, Integer pipelineId) Same as the four-arg-tail overloads above, but lets the caller pin the status to a specific pipeline.createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title) voidcreateMergeRequestNote(MergeRequest mr, String body) createProject(String projectName) voiddeleteMergeRequestEmoji(MergeRequest mr, Integer awardId) voiddeleteProject(String projectId) getBranches(String projectId) voidgetCommitMergeRequests(String projectId, String sha) getGroupProjects(String groupId) getGroupProjects(String groupId, Boolean includeSubgroups, ProjectVisibilityType visibility, OrderType orderBy, SortType sort) getMergeRequests(String projectId, State state, int page, int perPage) getPipelines(String projectName) getPipelines(String projectName, String sha, String source) Same asgetPipelines(String)but filtered to a commit SHA and pipeline source (e.g.getProject(String projectName) getProjectHooks(String projectName) updateProject(String projectId, String name, String path)
-
Method Details
-
getHostUrl
String getHostUrl() -
getGroups
-
getGroupProjects
-
getGroupProjects
-
getGroups
-
createProject
-
createMergeRequest
MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title) -
getProject
-
updateProject
-
deleteProject
-
getProjectHooks
-
addProjectHook
-
addProjectHook
-
changeBuildStatus
-
changeBuildStatus
-
changeBuildStatus
default void changeBuildStatus(String projectId, String sha, BuildState state, String ref, String context, String targetUrl, String description, Integer pipelineId) Same as the four-arg-tail overloads above, but lets the caller pin the status to a specific pipeline. Without this, GitLab decides which pipeline to attach the status to (or spins up a throwaway "external" one) based on sha+ref+context alone, which can silently disagree with whichever pipeline is actually the MR's head_pipeline. Pass null to fall back to the old, GitLab-decides behavior. Default implementation just ignores pipelineId and falls back to the old behavior, so existing GitLabClient implementations (e.g. test stubs) keep compiling unchanged. -
changeBuildStatus
-
getCommit
-
acceptMergeRequest
void acceptMergeRequest(MergeRequest mr, String mergeCommitMessage, Boolean shouldRemoveSourceBranch) -
createMergeRequestNote
-
getMergeRequestEmoji
-
awardMergeRequestEmoji
-
deleteMergeRequestEmoji
-
getMergeRequests
-
getBranches
-
getBranch
-
getCurrentUser
User getCurrentUser() -
addUser
-
updateUser
-
getLabels
-
getPipelines
-
getPipelines
Same asgetPipelines(String)but filtered to a commit SHA and pipeline source (e.g.merge_request_event); a null filter matches everything. The default implementation filtersgetPipelines(String)client-side. -
getCommitMergeRequests
-