public class GitlabAPI extends Object
Modifier and Type | Field and Description |
---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
Modifier and Type | Method and Description |
---|---|
GitlabMergeRequest |
acceptMergeRequest(GitlabProject project,
Integer mergeRequestIid,
String mergeCommitMessage) |
GitlabMergeRequest |
acceptMergeRequest(Serializable projectId,
Integer mergeRequestIid,
String mergeCommitMessage) |
GitlabNote |
addDiscussionNote(GitlabMergeRequest mergeRequest,
int discussionId,
String body)
Add a note to existing merge request discussion.
|
GitlabBadge |
addGroupBadge(Integer groupId,
String linkUrl,
String imageUrl)
Add group badge
|
GitlabGroupMember |
addGroupMember(GitlabGroup group,
GitlabUser user,
GitlabAccessLevel accessLevel)
Add a group member.
|
GitlabGroupMember |
addGroupMember(Integer groupId,
Integer userId,
GitlabAccessLevel accessLevel)
Add a group member.
|
GitlabBadge |
addProjectBadge(Serializable projectId,
String linkUrl,
String imageUrl)
Add project badge
|
GitlabProjectHook |
addProjectHook(GitlabProject project,
String url) |
GitlabProjectHook |
addProjectHook(GitlabProject project,
String url,
String token) |
GitlabProjectHook |
addProjectHook(Serializable projectId,
String url,
boolean pushEvents,
boolean issuesEvents,
boolean mergeRequestEvents,
boolean noteEvents,
boolean tagPushEvents,
boolean sslVerification,
boolean jobEvents,
boolean pipelineEvents,
boolean wikiPageEvents,
String token) |
GitlabProjectHook |
addProjectHook(Serializable projectId,
String url,
GitlabProjectHook hook,
String token) |
GitlabProjectMember |
addProjectMember(GitlabProject project,
GitlabUser user,
GitlabAccessLevel accessLevel)
Add a project member.
|
GitlabProjectMember |
addProjectMember(Integer projectId,
Integer userId,
GitlabAccessLevel accessLevel)
Add a project member.
|
GitlabSystemHook |
addSystemHook(String url)
Add new system hook hook
|
GitlabTag |
addTag(GitlabProject project,
String tagName,
String ref,
String message,
String releaseDescription)
Create tag in specific project
|
GitlabTag |
addTag(Serializable projectId,
String tagName,
String ref,
String message,
String releaseDescription)
Create tag in specific project
|
void |
blockUser(Integer targetUserId)
Block a user
|
GitlabJob |
cancelJob(Integer projectId,
Integer jobId)
Cancel a single job of a project
|
GitlabCommit |
cherryPick(GitlabProject project,
String sha,
String targetBranchName) |
GitlabCommit |
cherryPick(Serializable projectId,
String sha,
String targetBranchName)
Cherry picks a commit.
|
GitlabCommitComparison |
compareCommits(Serializable projectId,
String commitHash1,
String commitHash2) |
GitlabCommitComparison |
compareCommits(Serializable projectId,
String commitHash1,
String commitHash2,
Pagination pagination) |
static GitlabAPI |
connect(String hostUrl,
String apiToken) |
static GitlabSession |
connect(String hostUrl,
String username,
String password) |
static GitlabAPI |
connect(String hostUrl,
String apiToken,
TokenType tokenType) |
static GitlabAPI |
connect(String hostUrl,
String apiToken,
TokenType tokenType,
AuthMethod method) |
static GitlabAPI |
connect(String hostUrl,
String apiToken,
TokenType tokenType,
AuthMethod method,
String apiNamespace) |
static GitlabAPI |
connect(String hostUrl,
String apiToken,
TokenType tokenType,
String apiNamespace) |
GitlabAward |
createAward(GitlabIssue issue,
Integer noteId,
String awardName)
Create an award for an issue note
|
GitlabAward |
createAward(GitlabIssue issue,
String awardName)
Create an award for an issue
|
GitlabAward |
createAward(GitlabMergeRequest mergeRequest,
String awardName)
Create an award for a merge request
|
void |
createBranch(GitlabProject project,
String branchName,
String ref)
Create Branch.
|
void |
createBranch(Serializable projectId,
String branchName,
String ref)
Create Branch.
|
GitlabBuildVariable |
createBuildVariable(Integer projectId,
GitlabBuildVariable variable)
Creates a new variable.
|
GitlabBuildVariable |
createBuildVariable(Integer projectId,
String key,
String value)
Creates a new build variable.
|
CommitComment |
createCommitComment(Serializable projectId,
String sha,
String note,
String path,
String line,
String line_type)
Post comment to commit
|
GitlabCommitStatus |
createCommitStatus(GitlabProject project,
String commitHash,
String state,
String ref,
String name,
String targetUrl,
String description) |
GitlabCommitStatus |
createCommitStatus(Serializable projectId,
String commitHash,
String state,
String ref,
String name,
String targetUrl,
String description) |
GitlabSSHKey |
createDeployKey(Integer targetProjectId,
String title,
String key)
Create a new deploy key for the project
|
GitlabDiscussion |
createDiscussion(GitlabMergeRequest mergeRequest,
String body,
String positionBaseSha,
String positionStartSha,
String positionHeadSha)
Create a discussion just with the required arguments.
|
GitlabProject |
createFork(String namespace,
GitlabProject gitlabProject) |
GitlabProject |
createFork(String namespace,
Integer projectId) |
GitlabProject |
createFork(String namespace,
Integer projectId,
String path,
String name) |
GitlabGroup |
createGroup(CreateGroupRequest request,
GitlabUser sudoUser)
Creates a Group
|
GitlabGroup |
createGroup(GitlabGroup group,
GitlabUser sudoUser)
Creates a Group
|
GitlabGroup |
createGroup(String name)
Creates a Group
|
GitlabGroup |
createGroup(String name,
String path)
Creates a Group
|
GitlabGroup |
createGroup(String name,
String path,
String ldapCn,
GitlabAccessLevel ldapAccess)
Creates a Group
|
GitlabGroup |
createGroup(String name,
String path,
String ldapCn,
GitlabAccessLevel ldapAccess,
GitlabUser sudoUser)
Creates a Group
|
GitlabGroup |
createGroup(String name,
String path,
String ldapCn,
GitlabAccessLevel ldapAccess,
GitlabUser sudoUser,
Integer parentId)
Creates a Group
|
GitlabGroup |
createGroupViaSudo(String name,
String path,
GitlabUser sudoUser)
Creates a Group
|
GitlabDiscussion |
createImageDiscussion(GitlabMergeRequest mergeRequest,
String body,
String position,
String positionBaseSha,
String positionStartSha,
String positionHeadSha,
String positionNewPath,
String positionOldPath,
Integer positionWidth,
Integer positionHeight,
Integer positionX,
Integer positionY)
Create a new discussion with position type image on the given merge request.
|
GitlabIssue |
createIssue(int projectId,
int assigneeId,
Integer milestoneId,
String labels,
String description,
String title) |
GitlabLabel |
createLabel(Serializable projectId,
GitlabLabel label)
Creates a new label.
|
GitlabLabel |
createLabel(Serializable projectId,
String name,
String color)
Creates a new label.
|
GitlabMergeRequest |
createMergeRequest(Serializable projectId,
String sourceBranch,
String targetBranch,
Integer assigneeId,
String title)
Create a new MergeRequest
|
GitlabMilestone |
createMilestone(Serializable projectId,
GitlabMilestone milestone)
Creates a new project milestone.
|
GitlabMilestone |
createMilestone(Serializable projectId,
String title,
String description,
Date dueDate,
Date startDate)
Cretaes a new project milestone.
|
GitlabNote |
createNote(GitlabIssue issue,
String message) |
GitlabNote |
createNote(GitlabMergeRequest mergeRequest,
String body) |
GitlabNote |
createNote(Serializable projectId,
Integer issueId,
String message) |
boolean |
createOrEditJiraService(Integer projectId,
GitlabJiraProperties jiraPropties)
Set JIRA service for a project.
|
GitlabProject |
createProject(GitlabProject project)
Creates a Project
|
GitlabProject |
createProject(String name)
Creates a private Project
|
GitlabProject |
createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean wallEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean publik,
String visibility,
String importUrl)
Deprecated.
|
GitlabProject |
createProjectForGroup(String name,
GitlabGroup group)
Creates a group Project
|
GitlabProject |
createProjectForGroup(String name,
GitlabGroup group,
String description)
Creates a group Project
|
GitlabProject |
createProjectForGroup(String name,
GitlabGroup group,
String description,
String visibility)
Creates a group Project
|
GitlabSSHKey |
createPushDeployKey(Integer targetProjectId,
String title,
String key)
Create a new deploy key for the project which can push.
|
GitlabSimpleRepositoryFile |
createRepositoryFile(GitlabProject project,
String path,
String branchName,
String commitMsg,
String content)
Creates a new file in the repository
|
GitlabSSHKey |
createSSHKey(Integer targetUserId,
String title,
String key)
Create a new ssh key for the user
|
GitlabSSHKey |
createSSHKey(String title,
String key)
Create a new ssh key for the authenticated user.
|
GitlabDiscussion |
createTextDiscussion(GitlabMergeRequest mergeRequest,
String body,
String position,
String positionBaseSha,
String positionStartSha,
String positionHeadSha,
String positionNewPath,
Integer positionNewLine,
String positionOldPath,
Integer positionOldLine)
Create a new discussion with position type text on the given merge request.
|
GitlabUser |
createUser(CreateUserRequest request)
Create a new user.
|
GitlabUser |
createUser(String email,
String password,
String username,
String fullName,
String skypeId,
String linkedIn,
String twitter,
String website_url,
Integer projects_limit,
String extern_uid,
String extern_provider_name,
String bio,
Boolean isAdmin,
Boolean can_create_group,
Boolean skip_confirmation,
Boolean external)
Create a new User
|
GitlabProject |
createUserProject(Integer userId,
String name)
Creates a Project for a specific User
|
GitlabProject |
createUserProject(Integer userId,
String name,
String description,
String defaultBranch,
Boolean issuesEnabled,
Boolean wallEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
String visibility,
String importUrl)
Deprecated.
|
void |
deleteAward(GitlabIssue issue,
GitlabAward award)
Delete an award for an issue
|
void |
deleteAward(GitlabIssue issue,
Integer noteId,
GitlabAward award)
Delete an award for an issue note
|
void |
deleteAward(GitlabMergeRequest mergeRequest,
GitlabAward award)
Delete an award for a merge request
|
void |
deleteBranch(Serializable projectId,
String branchName)
Delete Branch.
|
void |
deleteBuildVariable(Integer projectId,
GitlabBuildVariable variable)
Deletes an existing variable.
|
void |
deleteBuildVariable(Integer projectId,
String key)
Deletes an existing variable.
|
void |
deleteDeployKey(Integer targetProjectId,
Integer targetKeyId)
Delete a deploy key for a project
|
void |
deleteDiscussionNote(GitlabMergeRequest mergeRequest,
int discussionId,
int noteId)
Delete a discussion note of a merge request.
|
void |
deleteGroup(Integer groupId)
Delete a group.
|
void |
deleteGroupBadge(Integer groupId,
Integer badgeId)
Delete group badge
|
void |
deleteGroupMember(GitlabGroup group,
GitlabUser user)
Delete a group member.
|
void |
deleteGroupMember(Integer groupId,
Integer userId)
Delete a group member.
|
boolean |
deleteJiraService(Integer projectId)
Remove all previously JIRA settings from a project.
|
void |
deleteLabel(Serializable projectId,
GitlabLabel label)
Deletes an existing label.
|
void |
deleteLabel(Serializable projectId,
String name)
Deletes an existing label.
|
void |
deleteNote(GitlabIssue issue,
GitlabNote noteToDelete)
Delete an Issue Note
|
void |
deleteNote(GitlabMergeRequest mergeRequest,
GitlabNote noteToDelete)
Delete a Merge Request Note
|
void |
deleteNote(Serializable projectId,
Integer issueId,
GitlabNote noteToDelete)
Delete an Issue Note
|
void |
deleteProject(Serializable projectId)
Delete a Project.
|
void |
deleteProjectBadge(Serializable projectId,
Integer badgeId)
Delete project badge
|
void |
deleteProjectHook(GitlabProjectHook hook) |
void |
deleteProjectHook(GitlabProject project,
String hookId) |
void |
deleteProjectMember(GitlabProject project,
GitlabUser user)
Delete a project team member.
|
void |
deleteProjectMember(Integer projectId,
Integer userId)
Delete a project team member.
|
void |
deleteRepositoryFile(GitlabProject project,
String path,
String branchName,
String commitMsg)
Deletes an existing file in the repository
|
void |
deleteSharedProjectGroupLink(GitlabGroup group,
GitlabProject project)
Delete a shared project link within a group.
|
void |
deleteSharedProjectGroupLink(int groupId,
int projectId)
Delete a shared project link within a group.
|
void |
deleteSSHKey(Integer targetUserId,
Integer targetKeyId)
Delete user's ssh key
|
GitlabSystemHook |
deleteSystemHook(Integer hookId)
Delete system hook
|
void |
deleteTag(GitlabProject project,
String tagName)
Delete tag in specific project
|
void |
deleteTag(Serializable projectId,
String tagName)
Delete tag in specific project
|
void |
deleteUser(Integer targetUserId)
Delete a user
|
GitlabHTTPRequestor |
dispatch() |
GitlabBadge |
editGroupBadge(Integer groupId,
Integer badgeId,
String linkUrl,
String imageUrl)
Edit group badge
|
GitlabIssue |
editIssue(int projectId,
int issueId,
int assigneeId,
int milestoneId,
String labels,
String description,
String title,
GitlabIssue.Action action) |
GitlabBadge |
editProjectBadge(Serializable projectId,
Integer badgeId,
String linkUrl,
String imageUrl)
Edit project badge
|
GitlabProjectHook |
editProjectHook(GitlabProject project,
GitlabProjectHook projectHook,
String token) |
GitlabProjectHook |
editProjectHook(GitlabProject project,
String hookId,
String url,
boolean pushEvents,
boolean issuesEvents,
boolean mergeRequestEvents,
boolean noteEvents,
boolean tagPushEvents,
boolean sslVerification,
boolean jobEvents,
boolean pipelineEvents,
boolean wikiPageEvents,
String token) |
GitlabJob |
eraseJob(Integer projectId,
Integer jobId)
Erase a single job of a project (remove job artifacts and a job trace)
|
List<GitlabUser> |
findUsers(String emailOrUsername)
Finds users by email address or username.
|
List<GitlabAward> |
getAllAwards(GitlabIssue issue)
Get all awards for an issue
|
List<GitlabAward> |
getAllAwards(GitlabIssue issue,
Integer noteId)
Get all awards for an issue note
|
List<GitlabAward> |
getAllAwards(GitlabMergeRequest mergeRequest)
Get all awards for a merge request
|
List<GitlabCommit> |
getAllCommits(Serializable projectId) |
List<GitlabCommit> |
getAllCommits(Serializable projectId,
Pagination pagination,
String branchOrTag) |
List<GitlabCommit> |
getAllCommits(Serializable projectId,
String branchOrTag) |
List<GitlabMergeRequest> |
getAllMergeRequests(GitlabProject project) |
List<GitlabNote> |
getAllNotes(GitlabMergeRequest mergeRequest) |
List<GitlabProject> |
getAllProjects()
Get's all projects in Gitlab, requires sudo user
|
URL |
getAPIUrl(String tailAPIUrl) |
GitlabAward |
getAward(GitlabIssue issue,
Integer awardId)
Get a specific award for an issue
|
GitlabAward |
getAward(GitlabIssue issue,
Integer noteId,
Integer awardId)
Get a specific award for an issue note
|
GitlabAward |
getAward(GitlabMergeRequest mergeRequest,
Integer awardId)
Get a specific award for a merge request
|
GitlabBranch |
getBranch(GitlabProject project,
String branchName) |
GitlabBranch |
getBranch(Serializable projectId,
String branchName) |
List<GitlabBranch> |
getBranches(GitlabProject project) |
List<GitlabBranch> |
getBranches(Serializable projectId) |
GitlabBuildVariable |
getBuildVariable(GitlabProject project,
String key)
Gets build variable associated with a project and key.
|
GitlabBuildVariable |
getBuildVariable(Integer projectId,
String key)
Gets build variable associated with a project and key.
|
List<GitlabBuildVariable> |
getBuildVariables(GitlabProject project)
Gets build variables associated with a project.
|
List<GitlabBuildVariable> |
getBuildVariables(Integer projectId)
Gets build variables associated with a project.
|
List<GitlabMergeRequest> |
getClosedMergeRequests(GitlabProject project) |
List<GitlabMergeRequest> |
getClosedMergeRequests(GitlabProject project,
Pagination pagination) |
List<GitlabMergeRequest> |
getClosedMergeRequests(Serializable projectId) |
List<GitlabMergeRequest> |
getClosedMergeRequests(Serializable projectId,
Pagination pagination) |
GitlabCommit |
getCommit(Serializable projectId,
String commitHash) |
List<CommitComment> |
getCommitComments(Integer projectId,
String sha)
Get the comments of a commit
|
List<GitlabCommitDiff> |
getCommitDiffs(Serializable projectId,
String commitHash) |
List<GitlabCommitDiff> |
getCommitDiffs(Serializable projectId,
String commitHash,
Pagination pagination) |
List<GitlabCommit> |
getCommits(GitlabMergeRequest mergeRequest) |
List<GitlabCommit> |
getCommits(GitlabMergeRequest mergeRequest,
Pagination pagination) |
List<GitlabCommit> |
getCommits(Serializable projectId,
Pagination pagination,
String branchOrTag) |
List<GitlabCommit> |
getCommits(Serializable projectId,
Pagination pagination,
String branchOrTag,
String path) |
List<GitlabCommitStatus> |
getCommitStatuses(GitlabProject project,
String commitHash) |
List<GitlabCommitStatus> |
getCommitStatuses(GitlabProject project,
String commitHash,
Pagination pagination) |
List<GitlabCommitStatus> |
getCommitStatuses(Serializable projectId,
String commitHash) |
List<GitlabCommitStatus> |
getCommitStatuses(Serializable projectId,
String commitHash,
Pagination pagination) |
int |
getConnectionTimeout() |
GitlabSession |
getCurrentSession() |
List<GitlabSSHKey> |
getDeployKeys(Integer targetProjectId)
Gets all deploy keys for a project
|
GitlabDiscussion |
getDiscussion(GitlabMergeRequest mergeRequest,
int discussionId)
Get a discussion by id from a merge request.
|
List<GitlabDiscussion> |
getDiscussions(GitlabMergeRequest mergeRequest)
Get the discussions from a merge request.
|
GitlabServiceEmailOnPush |
getEmailsOnPush(Integer projectId)
Gets email-on-push service setup for a projectId.
|
List<GitlabEvent> |
getEvents(GitlabProject project,
GitlabEvent.ActionType action,
GitlabEvent.TargetType targetType,
GitlabDate before,
GitlabDate after,
SortOrder sortOrder)
Get events for a project.
|
List<GitlabEvent> |
getEvents(GitlabProject project,
GitlabEvent.ActionType action,
GitlabEvent.TargetType targetType,
GitlabDate before,
GitlabDate after,
SortOrder sortOrder,
Pagination pagination)
Get events for a project.
|
byte[] |
getFileArchive(GitlabProject project)
Get an archive of the repository
|
GitlabGroup |
getGroup(Integer groupId) |
GitlabGroup |
getGroup(String path)
Get a group by path, including its projects.
|
GitlabGroup |
getGroup(String path,
boolean withProjects)
Get a group by path
|
GitlabBadge |
getGroupBadge(Integer groupId,
Integer badgeId)
Get group badge
|
List<GitlabBadge> |
getGroupBadges(Integer groupId)
Get project badges
|
List<GitlabGroupMember> |
getGroupMembers(GitlabGroup group)
Gets all members of a Group
|
List<GitlabGroupMember> |
getGroupMembers(Integer groupId)
Gets all members of a Group
|
List<GitlabMilestone> |
getGroupMilestones(Serializable groupId) |
List<GitlabProject> |
getGroupProjects(GitlabGroup group)
Get all the projects for a group.
|
List<GitlabProject> |
getGroupProjects(Integer groupId)
Get all the projects for a group.
|
List<GitlabGroup> |
getGroups() |
List<GitlabGroup> |
getGroupsViaSudo(String username,
Pagination pagination) |
GitlabGroup |
getGroupWithoutProjects(Integer groupId) |
GitlabGroup |
getGroupWithoutProjects(String path)
Get a group by path.
|
String |
getHost() |
GitlabIssue |
getIssue(Serializable projectId,
Integer issueId) |
List<GitlabIssue> |
getIssues(GitlabGroup group,
GitlabMilestone milestone) |
List<GitlabIssue> |
getIssues(GitlabProject project) |
List<GitlabIssue> |
getIssues(GitlabProject project,
GitlabMilestone milestone) |
List<GitlabIssue> |
getIssues(Serializable projectId) |
GitlabIssueTimeStats |
getIssueTimeStats(Serializable projectId,
Integer issueId) |
GitlabServiceJira |
getJiraService(Integer projectId)
Get JIRA service settings for a project.
|
byte[] |
getJobArtifact(GitlabProject project,
GitlabJob job)
Get build artifacts of a project build
|
byte[] |
getJobArtifact(Integer projectId,
Integer jobId)
Get build artifacts of a project build
|
byte[] |
getJobTrace(GitlabProject project,
GitlabJob job)
Get build trace of a project build
|
byte[] |
getJobTrace(Integer projectId,
Integer jobId)
Get build trace of a project build
|
List<GitlabLabel> |
getLabels(GitlabProject project)
Gets labels associated with a project.
|
List<GitlabLabel> |
getLabels(Serializable projectId)
Gets labels associated with a project.
|
List<GitlabCommit> |
getLastCommits(Serializable projectId) |
List<GitlabCommit> |
getLastCommits(Serializable projectId,
String branchOrTag) |
List<GitlabProject> |
getMembershipProjects()
Get a list of projects that the authenticated user is a member of.
|
List<GitlabMergeRequest> |
getMergedMergeRequests(GitlabProject project) |
List<GitlabMergeRequest> |
getMergedMergeRequests(GitlabProject project,
Pagination pagination) |
List<GitlabMergeRequest> |
getMergedMergeRequests(Serializable projectId) |
List<GitlabMergeRequest> |
getMergedMergeRequests(Serializable projectId,
Pagination pagination) |
GitlabMergeRequest |
getMergeRequest(GitlabProject project,
Integer mergeRequestIid) |
GitlabMergeRequest |
getMergeRequest(Serializable projectId,
Integer mergeRequestIid) |
GitlabMergeRequestApprovals |
getMergeRequestApprovals(GitlabMergeRequest mr)
Get information about the approvals present and required for a merge request
EE only.
|
GitlabMergeRequest |
getMergeRequestByIid(Serializable projectId,
Integer mergeRequestIid)
Return Merge Request.
|
GitlabMergeRequest |
getMergeRequestChanges(Serializable projectId,
Integer mergeRequestIid)
Return a Merge Request including its changes.
|
List<GitlabMergeRequest> |
getMergeRequests(GitlabProject project) |
List<GitlabMergeRequest> |
getMergeRequests(GitlabProject project,
Pagination pagination) |
List<GitlabMergeRequest> |
getMergeRequests(Serializable projectId) |
List<GitlabMergeRequest> |
getMergeRequests(Serializable projectId,
Pagination pagination) |
List<GitlabMergeRequest> |
getMergeRequestsWithStatus(GitlabProject project,
String status) |
List<GitlabMergeRequest> |
getMergeRequestsWithStatus(GitlabProject project,
String state,
Pagination pagination) |
List<GitlabMergeRequest> |
getMergeRequestsWithStatus(Serializable projectId,
String status) |
List<GitlabMergeRequest> |
getMergeRequestsWithStatus(Serializable projectId,
String state,
Pagination pagination) |
List<GitlabMilestone> |
getMilestones(GitlabGroup group) |
List<GitlabMilestone> |
getMilestones(GitlabProject project) |
List<GitlabProjectMember> |
getNamespaceMembers(GitlabNamespace namespace)
This will fail, if the given namespace is a user and not a group
|
List<GitlabProjectMember> |
getNamespaceMembers(Integer namespaceId)
This will fail, if the given namespace is a user and not a group
|
List<GitlabNamespace> |
getNamespaces()
Get a list of the namespaces of the authenticated user.
|
GitlabNote |
getNote(GitlabIssue issue,
Integer noteId) |
GitlabNote |
getNote(GitlabMergeRequest mergeRequest,
Integer noteId)
Get a Note from a Merge Request.
|
List<GitlabNote> |
getNotes(GitlabIssue issue) |
List<GitlabNote> |
getNotes(GitlabMergeRequest mergeRequest) |
List<GitlabMergeRequest> |
getOpenMergeRequests(GitlabProject project) |
List<GitlabMergeRequest> |
getOpenMergeRequests(GitlabProject project,
Pagination pagination) |
List<GitlabMergeRequest> |
getOpenMergeRequests(Serializable projectId) |
List<GitlabMergeRequest> |
getOpenMergeRequests(Serializable projectId,
Pagination pagination) |
List<GitlabProject> |
getOwnedProjects()
Get a list of projects owned by the authenticated user.
|
List<GitlabJob> |
getPipelineJobs(GitlabProject project,
Integer pipelineId)
Gets a list of project's jobs of the given pipeline in Gitlab
|
List<GitlabJob> |
getPipelineJobs(Integer projectId,
Integer pipelineId)
Gets a list of project's jobs of the given pipeline in Gitlab
|
List<GitlabTrigger> |
getPipelineTriggers(GitlabProject project)
Returns the list of build triggers for a project.
|
GitlabProject |
getProject(Serializable projectId)
Get Project by project Id
|
GitlabProject |
getProject(String namespace,
String projectName)
use namespace & project name to get project
|
GitlabBadge |
getProjectBadge(Serializable projectId,
Integer badgeId)
Get project badge
|
List<GitlabBadge> |
getProjectBadges(Serializable projectId)
Get project badges
|
List<GitlabEvent> |
getProjectEvents(Serializable projectId,
GitlabEvent.ActionType action,
GitlabEvent.TargetType targetType,
GitlabDate before,
GitlabDate after,
SortOrder sort)
Get events for a project.
|
List<GitlabEvent> |
getProjectEvents(Serializable projectId,
GitlabEvent.ActionType action,
GitlabEvent.TargetType targetType,
GitlabDate before,
GitlabDate after,
SortOrder sort,
Pagination pagination)
Get events for a project.
|
GitlabProjectHook |
getProjectHook(GitlabProject project,
String hookId) |
List<GitlabProjectHook> |
getProjectHooks(GitlabProject project) |
List<GitlabProjectHook> |
getProjectHooks(Serializable projectId) |
GitlabJob |
getProjectJob(Integer projectId,
Integer jobId)
Gets a build for a project
|
List<GitlabJob> |
getProjectJobs(GitlabProject project)
Gets a list of a project's jobs in Gitlab
|
List<GitlabJob> |
getProjectJobs(Integer projectId)
Gets a list of a project's jobs in Gitlab
|
String |
getProjectJson(Serializable projectId) |
String |
getProjectJson(String namespace,
String projectName) |
List<GitlabProjectMember> |
getProjectMembers(GitlabProject project) |
List<GitlabProjectMember> |
getProjectMembers(GitlabProject project,
Pagination pagination) |
List<GitlabProjectMember> |
getProjectMembers(Serializable projectId) |
List<GitlabProjectMember> |
getProjectMembers(Serializable projectId,
Pagination pagination) |
List<GitlabMilestone> |
getProjectMilestones(Serializable projectId) |
GitlabPipeline |
getProjectPipeline(GitlabProject project,
GitlabPipeline pipeline)
Get a project's pipeline
|
GitlabPipeline |
getProjectPipeline(Integer projectId,
Integer pipelineId)
Get a project's pipeline
|
List<GitlabPipeline> |
getProjectPipelines(GitlabProject project)
Get a list of a project's pipelines in Gitlab
|
List<GitlabPipeline> |
getProjectPipelines(GitlabProject project,
PipelinesQuery pipelinesQuery)
Get a list of a project's pipelines in Gitlab
|
List<GitlabPipeline> |
getProjectPipelines(Integer projectId)
Get a list of a project's pipelines in Gitlab
|
List<GitlabPipeline> |
getProjectPipelines(Integer projectId,
PipelinesQuery pipelinesQuery)
Get a list of a project's pipelines in Gitlab
|
List<GitlabProject> |
getProjects()
Get a list of projects accessible by the authenticated user.
|
List<GitlabProject> |
getProjects(ProjectsQuery projectsQuery)
Get a list of projects accessible by the authenticated user.
|
List<GitlabProject> |
getProjectsViaSudo(GitlabUser user)
Get a list of projects accessible by the authenticated user.
|
List<GitlabProject> |
getProjectsViaSudoWithPagination(GitlabUser user,
int page,
int perPage)
Get a list of projects of perPage elements accessible by the authenticated user given page offset
|
List<GitlabProject> |
getProjectsViaSudoWithPagination(GitlabUser user,
Pagination pagination)
Get a list of projects of with Pagination.
|
List<GitlabProject> |
getProjectsWithPagination(int page,
int perPage)
Get a list of projects of size perPage accessible by the authenticated user.
|
List<GitlabProject> |
getProjectsWithPagination(Pagination pagination)
Get a list of projects by pagination accessible by the authenticated user.
|
Proxy |
getProxy() |
byte[] |
getRawBlobContent(GitlabProject project,
String sha)
Get the raw file contents for a blob by blob SHA.
|
byte[] |
getRawFileContent(GitlabProject project,
String sha,
String filepath)
Get raw file content
|
byte[] |
getRawFileContent(Serializable projectId,
String sha,
String filepath)
Get raw file content
|
GitlabRepositoryFile |
getRepositoryFile(GitlabProject project,
String path,
String ref) |
List<GitlabRepositoryTree> |
getRepositoryTree(GitlabProject project,
String path,
String ref,
boolean recursive)
Get an archive of the repository
|
int |
getRequestTimeout()
Deprecated.
use this.getResponseReadTimeout() method
|
int |
getResponseReadTimeout() |
GitlabRunner |
getRunnerDetail(int id)
Get details information of the runner with the specified id.
|
List<GitlabRunner> |
getRunners()
Returns a List of all GitlabRunners.
|
List<GitlabRunner> |
getRunners(GitlabRunner.RunnerScope scope)
Returns a List of GitlabRunners.
|
List<GitlabRunner> |
getRunnersWithPagination(GitlabRunner.RunnerScope scope,
int page,
int perPage)
Returns a list of runners with perPage elements on the page number specified.
|
List<GitlabRunner> |
getRunnersWithPagination(GitlabRunner.RunnerScope scope,
Pagination pagination)
Returns a list of runners with perPage elements on the page number specified.
|
GitlabSSHKey |
getSSHKey(Integer keyId)
Get key with user information by ID of an SSH key.
|
List<GitlabSSHKey> |
getSSHKeys(Integer targetUserId)
Gets all ssh keys for a user
|
List<GitlabProject> |
getStarredProjects()
Get a list of projects starred by the authenticated user.
|
List<GitlabSystemHook> |
getSystemHooks()
Get list of system hooks
|
GitlabTag |
getTag(GitlabProject project,
String tagName)
Get a single repository tag in a specific project
|
List<GitlabTag> |
getTags(GitlabProject project)
Get a list of tags in specific project
|
List<GitlabTag> |
getTags(Serializable projectId)
Get a list of tags in specific project
|
URL |
getUrl(String tailAPIUrl) |
GitlabUser |
getUser()
Return API User
|
GitlabUser |
getUser(Integer userId) |
String |
getUserAgent() |
List<GitlabUser> |
getUsers() |
GitlabUser |
getUserViaSudo(String username) |
GitlabVersion |
getVersion() |
GitlabAPI |
ignoreCertificateErrors(boolean ignoreCertificateErrors) |
boolean |
isIgnoreCertificateErrors() |
GitlabNote |
modifyDiscussionNote(GitlabMergeRequest mergeRequest,
int discussionId,
int noteId,
String body,
Boolean resolved)
Modify or resolve an existing discussion note of the given merge request.
|
GitlabIssue |
moveIssue(Integer projectId,
Integer issueId,
Integer toProjectId) |
GitlabJob |
playJob(Integer projectId,
Integer jobId)
Triggers a manual action to start a job.
|
void |
protectBranch(GitlabProject project,
String branchName) |
void |
protectBranchWithDeveloperOptions(GitlabProject project,
String branchName,
boolean developers_can_push,
boolean developers_can_merge) |
GitlabAPI |
proxy(Proxy proxy) |
GitlabHTTPRequestor |
put() |
GitlabDiscussion |
resolveDiscussion(GitlabMergeRequest mergeRequest,
int discussionId,
boolean resolved)
Resolve or unresolve a whole discussion of a merge request.
|
GitlabHTTPRequestor |
retrieve() |
GitlabJob |
retryJob(Integer projectId,
Integer jobId)
Retry a single job of a project
|
GitlabPipeline |
runPipeline(GitlabProject project,
String ref,
List<GitlabBuildVariable> variables)
Run pipeline for selected project and branch
|
GitlabPipeline |
runPipeline(Integer projectId,
String ref,
List<GitlabBuildVariable> variables)
Run pipeline for selected project and branch
|
List<GitlabProject> |
searchProjects(String search)
Get a list of projects accessible by the authenticated user by search.
|
GitlabAPI |
setConnectionTimeout(int connectionTimeout) |
GitlabMergeRequestApprovals |
setMergeRequestApprovals(GitlabMergeRequest mr,
int count)
Set the number of required approvers.
|
GitlabMergeRequestApprovals |
setMergeRequestApprovers(GitlabMergeRequest mr,
Collection<Integer> userApproverIds,
Collection<Integer> groupApproverIds)
Set the list of approvers.
|
GitlabAPI |
setRequestTimeout(int readTimeout)
Deprecated.
use this.setResponseReadTimeout(int readTimeout) method
|
GitlabAPI |
setResponseReadTimeout(int readTimeout) |
void |
setUserAgent(String userAgent)
Set the User-Agent header for the requests.
|
void |
shareProjectWithGroup(GitlabAccessLevel accessLevel,
String expiration,
GitlabGroup group,
GitlabProject project)
Share a project with a group.
|
void |
testSystemHook(Integer hookId)
Test system hook
|
void |
transfer(Integer namespaceId,
Integer projectId)
Transfer a project to the given namespace
|
void |
unblockUser(Integer targetUserId)
Unblock a user
|
void |
unprotectBranch(GitlabProject project,
String branchName) |
GitlabBuildVariable |
updateBuildVariable(Integer projectId,
String key,
String newValue)
Updates an existing variable.
|
boolean |
updateEmailsOnPush(Integer projectId,
String emailAddress)
Update recipients for email-on-push service for a projectId.
|
GitlabGroup |
updateGroup(GitlabGroup group,
GitlabUser sudoUser)
Updates a Group
|
GitlabLabel |
updateLabel(Serializable projectId,
String name,
String newName,
String newColor)
Updates an existing label.
|
GitlabMergeRequest |
updateMergeRequest(Serializable projectId,
Integer mergeRequestIid,
String targetBranch,
Integer assigneeId,
String title,
String description,
String stateEvent,
String labels)
Updates a Merge Request
|
GitlabMilestone |
updateMilestone(GitlabMilestone edited,
String stateEvent)
Updates an existing project milestone.
|
GitlabMilestone |
updateMilestone(Serializable projectId,
GitlabMilestone edited,
String stateEvent)
Updates an existing project milestone.
|
GitlabMilestone |
updateMilestone(Serializable projectId,
int milestoneId,
String title,
String description,
Date dueDate,
Date startDate,
String stateEvent)
Updates an existing project milestone.
|
GitlabNote |
updateNote(GitlabMergeRequest mergeRequest,
Integer noteId,
String body)
Update a Merge Request Note
|
GitlabProject |
updateProject(Integer projectId,
String name,
String description,
String defaultBranch,
Boolean issuesEnabled,
Boolean wallEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
String visibility)
Deprecated.
|
GitlabProjectMember |
updateProjectMember(Integer projectId,
Integer userId,
GitlabAccessLevel accessLevel)
Updates a project member.
|
GitlabProjectMember |
updateProjectMember(Integer projectId,
Integer userId,
GitlabAccessLevel accessLevel,
String expiresAt)
Updates a project member.
|
GitlabSimpleRepositoryFile |
updateRepositoryFile(GitlabProject project,
String path,
String branchName,
String commitMsg,
String content)
Updates the content of an existing file in the repository
|
GitlabUser |
updateUser(Integer targetUserId,
String email,
String password,
String username,
String fullName,
String skypeId,
String linkedIn,
String twitter,
String website_url,
Integer projects_limit,
String extern_uid,
String extern_provider_name,
String bio,
Boolean isAdmin,
Boolean can_create_group,
Boolean external)
Update a user
|
GitlabUpload |
uploadFile(GitlabProject project,
File file)
Uploads a file to a project
|
public static GitlabSession connect(String hostUrl, String username, String password) throws IOException
IOException
public static GitlabAPI connect(String hostUrl, String apiToken, TokenType tokenType, AuthMethod method)
public static GitlabAPI connect(String hostUrl, String apiToken, TokenType tokenType, String apiNamespace)
public static GitlabAPI connect(String hostUrl, String apiToken, TokenType tokenType, AuthMethod method, String apiNamespace)
public GitlabAPI ignoreCertificateErrors(boolean ignoreCertificateErrors)
public int getResponseReadTimeout()
@Deprecated public int getRequestTimeout()
@Deprecated public GitlabAPI setRequestTimeout(int readTimeout)
public GitlabAPI setResponseReadTimeout(int readTimeout)
public int getConnectionTimeout()
public GitlabAPI setConnectionTimeout(int connectionTimeout)
public GitlabHTTPRequestor retrieve()
public GitlabHTTPRequestor dispatch()
public GitlabHTTPRequestor put()
public boolean isIgnoreCertificateErrors()
public Proxy getProxy()
public URL getAPIUrl(String tailAPIUrl) throws IOException
IOException
public URL getUrl(String tailAPIUrl) throws IOException
IOException
public String getHost()
public List<GitlabUser> getUsers()
public List<GitlabUser> findUsers(String emailOrUsername) throws IOException
emailOrUsername
- Some portion of the email address or usernameIOException
- on gitlab api call errorpublic GitlabUser getUser() throws IOException
IOException
public GitlabUser getUser(Integer userId) throws IOException
IOException
public GitlabUser getUserViaSudo(String username) throws IOException
IOException
public GitlabUser createUser(String email, String password, String username, String fullName, String skypeId, String linkedIn, String twitter, String website_url, Integer projects_limit, String extern_uid, String extern_provider_name, String bio, Boolean isAdmin, Boolean can_create_group, Boolean skip_confirmation, Boolean external) throws IOException
email
- User emailpassword
- Passwordusername
- User namefullName
- Full nameskypeId
- Skype IdlinkedIn
- LinkedIntwitter
- Twitterwebsite_url
- Website URLprojects_limit
- Projects limitextern_uid
- External User IDextern_provider_name
- External Provider Namebio
- BioisAdmin
- Is Admincan_create_group
- Can Create Groupskip_confirmation
- Skip Confirmationexternal
- ExternalIOException
- on gitlab api call errorpublic GitlabUser createUser(CreateUserRequest request) throws IOException
request
- An object that represents the parameters for the request.GitlabUser
IOException
- on gitlab api call errorpublic GitlabUser updateUser(Integer targetUserId, String email, String password, String username, String fullName, String skypeId, String linkedIn, String twitter, String website_url, Integer projects_limit, String extern_uid, String extern_provider_name, String bio, Boolean isAdmin, Boolean can_create_group, Boolean external) throws IOException
targetUserId
- User IDemail
- User emailpassword
- Passwordusername
- User namefullName
- Full nameskypeId
- Skype IdlinkedIn
- LinkedIntwitter
- Twitterwebsite_url
- Website URLprojects_limit
- Projects limitextern_uid
- External User IDextern_provider_name
- External Provider Namebio
- BioisAdmin
- Is Admincan_create_group
- Can Create Groupexternal
- ExternalIOException
- on gitlab api call errorpublic void blockUser(Integer targetUserId) throws IOException
targetUserId
- The id of the Gitlab userIOException
- on gitlab api call errorpublic void unblockUser(Integer targetUserId) throws IOException
targetUserId
- The id of the Gitlab userIOException
- on gitlab api call errorpublic GitlabSSHKey createSSHKey(Integer targetUserId, String title, String key) throws IOException
targetUserId
- The id of the Gitlab usertitle
- The title of the ssh keykey
- The public keyIOException
- on gitlab api call errorpublic GitlabSSHKey createSSHKey(String title, String key) throws IOException
title
- The title of the ssh keykey
- The public keyIOException
- on gitlab api call errorpublic void deleteSSHKey(Integer targetUserId, Integer targetKeyId) throws IOException
targetUserId
- The id of the Gitlab usertargetKeyId
- The id of the Gitlab ssh keyIOException
- on gitlab api call errorpublic List<GitlabSSHKey> getSSHKeys(Integer targetUserId) throws IOException
targetUserId
- The id of the GitLab UserIOException
- on gitlab api call errorpublic GitlabSSHKey getSSHKey(Integer keyId) throws IOException
keyId
- The ID of an SSH keyIOException
- on gitlab api call errorpublic void deleteUser(Integer targetUserId) throws IOException
targetUserId
- The target User IDIOException
- on gitlab api call errorpublic GitlabGroup getGroup(Integer groupId) throws IOException
IOException
public GitlabGroup getGroupWithoutProjects(Integer groupId) throws IOException
IOException
public GitlabGroup getGroupWithoutProjects(String path) throws IOException
path
- Path of the groupGitlabGroup
objectIOException
- on gitlab api call errorpublic GitlabGroup getGroup(String path) throws IOException
path
- Path of the groupGitlabGroup
objectIOException
- on gitlab api call errorpublic GitlabGroup getGroup(String path, boolean withProjects) throws IOException
path
- Path of the groupwithProjects
- If true, include the projectsGitlabGroup
objectIOException
- on gitlab api call errorpublic List<GitlabGroup> getGroups() throws IOException
IOException
public List<GitlabGroup> getGroupsViaSudo(String username, Pagination pagination) throws IOException
IOException
public List<GitlabProject> getGroupProjects(GitlabGroup group)
group
- the target grouppublic List<GitlabProject> getGroupProjects(Integer groupId)
groupId
- the target group's id.public List<GitlabGroupMember> getGroupMembers(GitlabGroup group)
group
- The GitLab Grouppublic List<GitlabGroupMember> getGroupMembers(Integer groupId)
groupId
- The id of the GitLab Grouppublic GitlabGroup createGroup(String name) throws IOException
name
- The name of the group. The
name will also be used as the path
of the group.IOException
- on gitlab api call errorpublic GitlabGroup createGroup(String name, String path) throws IOException
name
- The name of the grouppath
- The path for the groupIOException
- on gitlab api call errorpublic GitlabGroup createGroupViaSudo(String name, String path, GitlabUser sudoUser) throws IOException
name
- The name of the grouppath
- The path for the groupsudoUser
- The user to create the group on behalf ofIOException
- on gitlab api call errorpublic GitlabGroup createGroup(String name, String path, String ldapCn, GitlabAccessLevel ldapAccess) throws IOException
name
- The name of the grouppath
- The path for the groupldapCn
- LDAP Group Name to sync with, null otherwiseldapAccess
- Access level for LDAP group members, null otherwiseIOException
- on gitlab api call errorpublic GitlabGroup createGroup(CreateGroupRequest request, GitlabUser sudoUser) throws IOException
request
- An object that represents the parameters for the request.sudoUser
- The user for whom we're creating the groupIOException
- on gitlab api call errorpublic GitlabGroup createGroup(String name, String path, String ldapCn, GitlabAccessLevel ldapAccess, GitlabUser sudoUser) throws IOException
name
- The name of the grouppath
- The path for the groupldapCn
- LDAP Group Name to sync with, null otherwiseldapAccess
- Access level for LDAP group members, null otherwisesudoUser
- The user to create the group on behalf ofIOException
- on gitlab api call errorpublic GitlabGroup createGroup(String name, String path, String ldapCn, GitlabAccessLevel ldapAccess, GitlabUser sudoUser, Integer parentId) throws IOException
name
- The name of the grouppath
- The path for the groupldapCn
- LDAP Group Name to sync with, null otherwiseldapAccess
- Access level for LDAP group members, null otherwisesudoUser
- The user to create the group on behalf ofparentId
- The id of a parent group; the new group will be its subgroupIOException
- on gitlab api call errorpublic GitlabGroup createGroup(GitlabGroup group, GitlabUser sudoUser) throws IOException
group
- The gitlab Group objectsudoUser
- The user to create the group on behalf ofIOException
- on gitlab api call errorpublic GitlabGroup updateGroup(GitlabGroup group, GitlabUser sudoUser) throws IOException
group
- the group objectsudoUser
- The user to create the group on behalf ofIOException
- on gitlab api call errorpublic GitlabGroupMember addGroupMember(GitlabGroup group, GitlabUser user, GitlabAccessLevel accessLevel) throws IOException
group
- the GitlabGroupuser
- the GitlabUseraccessLevel
- the GitlabAccessLevelIOException
- on gitlab api call errorpublic GitlabGroupMember addGroupMember(Integer groupId, Integer userId, GitlabAccessLevel accessLevel) throws IOException
groupId
- the group iduserId
- the user idaccessLevel
- the GitlabAccessLevelIOException
- on gitlab api call errorpublic void deleteGroupMember(GitlabGroup group, GitlabUser user) throws IOException
group
- the GitlabGroupuser
- the GitlabUserIOException
- on gitlab api call errorpublic void deleteGroupMember(Integer groupId, Integer userId) throws IOException
groupId
- the group iduserId
- the user idIOException
- on gitlab api call errorpublic void deleteGroup(Integer groupId) throws IOException
groupId
- the group idIOException
- on gitlab api call errorpublic List<GitlabProject> getAllProjects()
public GitlabProject getProject(Serializable projectId) throws IOException
projectId
- - gitlab project IdGitlabProject
IOException
- on gitlab api call errorpublic GitlabProject getProject(String namespace, String projectName) throws IOException
IOException
public String getProjectJson(Serializable projectId) throws IOException
IOException
public String getProjectJson(String namespace, String projectName) throws IOException
IOException
public List<GitlabProject> getProjects()
public List<GitlabProject> getProjectsWithPagination(int page, int perPage) throws IOException
page
- page offset.perPage
- number elements to get after page offset.IOException
- on Gitlab API call errorpublic List<GitlabProject> getProjects(ProjectsQuery projectsQuery)
public List<GitlabProject> getProjectsWithPagination(Pagination pagination) throws IOException
pagination
- IOException
- on gitlab api call errorpublic List<GitlabProject> getOwnedProjects() throws IOException
IOException
- on gitlab api call errorpublic List<GitlabProject> getMembershipProjects() throws IOException
IOException
- on gitlab api call errorpublic List<GitlabProject> getStarredProjects() throws IOException
IOException
- on gitlab api call errorpublic List<GitlabProject> getProjectsViaSudo(GitlabUser user) throws IOException
IOException
- on gitlab api call errorpublic List<GitlabProject> getProjectsViaSudoWithPagination(GitlabUser user, int page, int perPage) throws IOException
user
- Gitlab User to invoke sudo withpage
- Page offsetperPage
- Number of elements to get after page offsetIOException
- Gitlab API call errorpublic List<GitlabProject> getProjectsViaSudoWithPagination(GitlabUser user, Pagination pagination) throws IOException
user
- Gitlab User to invoke sudo withpagination
- IOException
- Gitlab API call errorpublic List<GitlabNamespace> getNamespaces()
public GitlabUpload uploadFile(GitlabProject project, File file) throws IOException
project
- file
- IOException
- on gitlab api call errorpublic GitlabPipeline getProjectPipeline(GitlabProject project, GitlabPipeline pipeline) throws IOException
project
- the projectpipeline
- the pipelineIOException
public GitlabPipeline getProjectPipeline(Integer projectId, Integer pipelineId) throws IOException
projectId
- the project idpipelineId
- the pipeline idIOException
public List<GitlabPipeline> getProjectPipelines(GitlabProject project)
project
- the projectpublic List<GitlabPipeline> getProjectPipelines(Integer projectId)
projectId
- the project idpublic List<GitlabPipeline> getProjectPipelines(GitlabProject project, PipelinesQuery pipelinesQuery)
project
- the projectpublic List<GitlabPipeline> getProjectPipelines(Integer projectId, PipelinesQuery pipelinesQuery)
projectId
- the project idpublic List<GitlabJob> getProjectJobs(GitlabProject project)
project
- the projectpublic List<GitlabJob> getProjectJobs(Integer projectId)
projectId
- the project idpublic GitlabPipeline runPipeline(GitlabProject project, String ref, List<GitlabBuildVariable> variables) throws IOException
project
- projectref
- branchvariables
- pipeline variablesIOException
public GitlabPipeline runPipeline(Integer projectId, String ref, List<GitlabBuildVariable> variables) throws IOException
projectId
- project's idref
- branchvariables
- pipeline variablesIOException
public List<GitlabJob> getPipelineJobs(GitlabProject project, Integer pipelineId)
project
- the projectpipelineId
- public List<GitlabJob> getPipelineJobs(Integer projectId, Integer pipelineId)
projectId
- pipelineId
- public GitlabJob cancelJob(Integer projectId, Integer jobId) throws IOException
projectId
- jobId
- IOException
- on gitlab api call errorpublic GitlabJob retryJob(Integer projectId, Integer jobId) throws IOException
projectId
- jobId
- IOException
- on gitlab api call errorpublic GitlabJob eraseJob(Integer projectId, Integer jobId) throws IOException
projectId
- jobId
- IOException
- on gitlab api call errorpublic GitlabJob playJob(Integer projectId, Integer jobId) throws IOException
projectId
- jobId
- IOException
- on gitlab api call errorpublic GitlabJob getProjectJob(Integer projectId, Integer jobId) throws IOException
projectId
- the project idjobId
- the build idIOException
- on gitlab api call errorpublic byte[] getJobArtifact(GitlabProject project, GitlabJob job) throws IOException
project
- The Projectjob
- The buildIOException
- on gitlab api call errorpublic byte[] getJobArtifact(Integer projectId, Integer jobId) throws IOException
projectId
- The Project's IdjobId
- The build's IdIOException
- on gitlab api call errorpublic byte[] getJobTrace(GitlabProject project, GitlabJob job) throws IOException
project
- The Projectjob
- The buildIOException
- on gitlab api call errorpublic byte[] getJobTrace(Integer projectId, Integer jobId) throws IOException
projectId
- The Project's IdjobId
- The build's IdIOException
- on gitlab api call errorpublic GitlabProject createProject(GitlabProject project) throws IOException
project
- The project to createIOException
- on gitlab api call errorpublic GitlabProject createProject(String name) throws IOException
name
- The name of the projectIOException
- on gitlab api call errorpublic GitlabProject createProjectForGroup(String name, GitlabGroup group) throws IOException
name
- The name of the projectgroup
- The group for which the project should be cratedIOException
- on gitlab api call errorpublic GitlabProject createProjectForGroup(String name, GitlabGroup group, String description) throws IOException
name
- The name of the projectgroup
- The group for which the project should be crateddescription
- The project descriptionIOException
- on gitlab api call errorpublic GitlabProject createProjectForGroup(String name, GitlabGroup group, String description, String visibility) throws IOException
name
- The name of the projectgroup
- The group for which the project should be crateddescription
- The project descriptionvisibility
- The project visibility level (private: 0, internal: 10, public: 20)IOException
- on gitlab api call error@Deprecated public GitlabProject createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean publik, String visibility, String importUrl) throws IOException
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultwallEnabled
- Whether The Wall should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise nullIOException
- on gitlab api call errorpublic GitlabProject createUserProject(Integer userId, String name) throws IOException
userId
- The id of the user to create the project forname
- The name of the projectIOException
- on gitlab api call error@Deprecated public GitlabProject createUserProject(Integer userId, String name, String description, String defaultBranch, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, String visibility, String importUrl) throws IOException
userId
- The id of the user to create the project forname
- The name of the projectdescription
- A description for the project, null otherwisedefaultBranch
- The default branch for the project, otherwise null indicates to use GitLab default (master)issuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultwallEnabled
- Whether The Wall should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise nullIOException
- on gitlab api call errorpublic GitlabProject createFork(String namespace, Integer projectId, String path, String name) throws IOException
namespace
- The namespace of the forkprojectId
- ProjectId of the project forkedpath
- The path that will be assigned to the resultant project after forking. (Optional)name
- The name that will be assigned to the resultant project after forking. (Optional)IOException
- on gitlab api call errorpublic GitlabProject createFork(String namespace, Integer projectId) throws IOException
namespace
- The namespace of the forkprojectId
- ProjectId of the project forkedIOException
- on gitlab api call errorpublic GitlabProject createFork(String namespace, GitlabProject gitlabProject) throws IOException
namespace
- The namespace of the forkgitlabProject
- The project forkedIOException
- on gitlab api call error@Deprecated public GitlabProject updateProject(Integer projectId, String name, String description, String defaultBranch, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, String visibility) throws IOException
projectId
- The id of the project to updatename
- The name of the projectdescription
- A description for the project, null otherwisedefaultBranch
- The branch displayed in the Gitlab UI when a user navigates to the projectissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultwallEnabled
- Whether The Wall should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility level of the project, otherwise null indicates to use GitLab defaultIOException
- on gitlab api call errorpublic void deleteProject(Serializable projectId) throws IOException
projectId
- The id of the project to deleteIOException
- on gitlab api call errorpublic List<GitlabMergeRequest> getOpenMergeRequests(Serializable projectId) throws IOException
IOException
public List<GitlabMergeRequest> getOpenMergeRequests(Serializable projectId, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getOpenMergeRequests(GitlabProject project) throws IOException
IOException
public List<GitlabMergeRequest> getOpenMergeRequests(GitlabProject project, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getMergedMergeRequests(Serializable projectId) throws IOException
IOException
public List<GitlabMergeRequest> getMergedMergeRequests(Serializable projectId, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getMergedMergeRequests(GitlabProject project) throws IOException
IOException
public List<GitlabMergeRequest> getMergedMergeRequests(GitlabProject project, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getClosedMergeRequests(Serializable projectId) throws IOException
IOException
public List<GitlabMergeRequest> getClosedMergeRequests(Serializable projectId, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getClosedMergeRequests(GitlabProject project) throws IOException
IOException
public List<GitlabMergeRequest> getClosedMergeRequests(GitlabProject project, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequestsWithStatus(Serializable projectId, String status) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequestsWithStatus(Serializable projectId, String state, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequestsWithStatus(GitlabProject project, String status) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequestsWithStatus(GitlabProject project, String state, Pagination pagination) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequests(Serializable projectId)
public List<GitlabMergeRequest> getMergeRequests(Serializable projectId, Pagination pagination)
public List<GitlabMergeRequest> getMergeRequests(GitlabProject project)
public List<GitlabMergeRequest> getMergeRequests(GitlabProject project, Pagination pagination)
public List<GitlabMergeRequest> getAllMergeRequests(GitlabProject project)
public GitlabMergeRequestApprovals getMergeRequestApprovals(GitlabMergeRequest mr) throws IOException
IOException
public GitlabMergeRequestApprovals setMergeRequestApprovals(GitlabMergeRequest mr, int count) throws IOException
IOException
public GitlabMergeRequestApprovals setMergeRequestApprovers(GitlabMergeRequest mr, Collection<Integer> userApproverIds, Collection<Integer> groupApproverIds) throws IOException
IOException
public GitlabCommit cherryPick(Serializable projectId, String sha, String targetBranchName) throws IOException
projectId
- The id of the projectsha
- The sha of the committargetBranchName
- The branch on which the commit must be cherry-pickedIOException
- on gitlab api call errorpublic GitlabCommit cherryPick(GitlabProject project, String sha, String targetBranchName) throws IOException
IOException
public GitlabMergeRequest getMergeRequestByIid(Serializable projectId, Integer mergeRequestIid) throws IOException
projectId
- The id of the projectmergeRequestIid
- The internal id of the merge requestIOException
- on gitlab api call errorpublic GitlabMergeRequest getMergeRequestChanges(Serializable projectId, Integer mergeRequestIid) throws IOException
projectId
- The id of the projectmergeRequestIid
- The internal id of the merge requestIOException
- on gitlab api call errorpublic GitlabMergeRequest getMergeRequest(Serializable projectId, Integer mergeRequestIid) throws IOException
IOException
public GitlabMergeRequest getMergeRequest(GitlabProject project, Integer mergeRequestIid) throws IOException
IOException
public GitlabMergeRequest createMergeRequest(Serializable projectId, String sourceBranch, String targetBranch, Integer assigneeId, String title) throws IOException
projectId
- sourceBranch
- targetBranch
- assigneeId
- title
- IOException
- on gitlab api call errorpublic GitlabMergeRequest updateMergeRequest(Serializable projectId, Integer mergeRequestIid, String targetBranch, Integer assigneeId, String title, String description, String stateEvent, String labels) throws IOException
projectId
- The id of the projectmergeRequestIid
- The internal id of the merge request to updatetargetBranch
- The target branch of the merge request, otherwise null to leave it untouchedassigneeId
- The id of the assignee, otherwise null to leave it untouchedtitle
- The title of the merge request, otherwise null to leave it untoucheddescription
- The description of the merge request, otherwise null to leave it untouchedstateEvent
- The state (close|reopen|merge) of the merge request, otherwise null to leave it untouchedlabels
- A comma separated list of labels, otherwise null to leave it untouchedIOException
- on gitlab api call errorpublic GitlabMergeRequest acceptMergeRequest(GitlabProject project, Integer mergeRequestIid, String mergeCommitMessage) throws IOException
project
- The ProjectmergeRequestIid
- Merge Request internal IDmergeCommitMessage
- optional merge commit message. Null if not setIOException
- on gitlab api call errorpublic GitlabMergeRequest acceptMergeRequest(Serializable projectId, Integer mergeRequestIid, String mergeCommitMessage) throws IOException
IOException
public GitlabNote getNote(GitlabMergeRequest mergeRequest, Integer noteId) throws IOException
mergeRequest
- The merge requestnoteId
- The id of the noteIOException
- on gitlab api call errorpublic List<GitlabNote> getNotes(GitlabMergeRequest mergeRequest) throws IOException
IOException
public List<GitlabNote> getAllNotes(GitlabMergeRequest mergeRequest)
public GitlabDiscussion getDiscussion(GitlabMergeRequest mergeRequest, int discussionId) throws IOException
mergeRequest
- to fetch the discussion from.discussionId
- The id of the discussion.IOException
- on a GitLab api call errorpublic List<GitlabDiscussion> getDiscussions(GitlabMergeRequest mergeRequest) throws IOException
mergeRequest
- to fetch the discussions from.IOException
- on a GitLab api call errorpublic GitlabDiscussion createDiscussion(GitlabMergeRequest mergeRequest, String body, String positionBaseSha, String positionStartSha, String positionHeadSha) throws IOException
mergeRequest
- The merge request where the discussion is created.body
- The content of a discussion.positionBaseSha
- The base commit SHA in the source branch.positionStartSha
- The SHA referencing the commit in the target branch.positionHeadSha
- The SHA referencing the HEAD of this merge request.IOException
- on a GitLab api call errorpublic GitlabDiscussion createTextDiscussion(GitlabMergeRequest mergeRequest, String body, String position, String positionBaseSha, String positionStartSha, String positionHeadSha, String positionNewPath, Integer positionNewLine, String positionOldPath, Integer positionOldLine) throws IOException
mergeRequest
- The merge request where the discussion is created.body
- The content of a discussion.position
- The position when creating a diff note. (hash)positionBaseSha
- The base commit SHA in the source branch.positionStartSha
- The SHA referencing the commit in the target branch.positionHeadSha
- The SHA referencing the HEAD of this merge request.positionNewPath
- The file path after the change.positionNewLine
- The Line number after changepositionOldPath
- The file path before the change.positionOldLine
- The Line number before change.IOException
- on a GitLab api call errorpublic GitlabDiscussion createImageDiscussion(GitlabMergeRequest mergeRequest, String body, String position, String positionBaseSha, String positionStartSha, String positionHeadSha, String positionNewPath, String positionOldPath, Integer positionWidth, Integer positionHeight, Integer positionX, Integer positionY) throws IOException
mergeRequest
- The merge request where the discussion is created.body
- The content of a discussion.position
- The position when creating a diff note. (hash)positionBaseSha
- The base commit SHA in the source branch.positionStartSha
- The SHA referencing the commit in the target branch.positionHeadSha
- The SHA referencing the HEAD of this merge request.positionNewPath
- The file path after the change.positionOldPath
- The file path before the change.positionWidth
- The width of the image.positionHeight
- The height of the image.positionX
- The X coordinate.positionY
- The Y coordinate.IOException
- on a GitLab api call errorpublic GitlabDiscussion resolveDiscussion(GitlabMergeRequest mergeRequest, int discussionId, boolean resolved) throws IOException
mergeRequest
- The merge request of the discussion.discussionId
- The id of the discussion to resolve.resolved
- Resolve or unresolve the note.IOException
- on a GitLab api call errorpublic GitlabNote addDiscussionNote(GitlabMergeRequest mergeRequest, int discussionId, String body) throws IOException
mergeRequest
- The merge request of the discussion.discussionId
- The id of the discussion to add a note to.body
- The content of the discussion.IOException
- on a GitLab api call errorpublic GitlabNote modifyDiscussionNote(GitlabMergeRequest mergeRequest, int discussionId, int noteId, String body, Boolean resolved) throws IOException
mergeRequest
- The merge request of the discussion.discussionId
- The id of the discussion to modify.noteId
- The id of the discussion note.body
- The content of the discussion.resolved
- Resolve or unresolve the note.IOException
- on a GitLab api call errorpublic void deleteDiscussionNote(GitlabMergeRequest mergeRequest, int discussionId, int noteId) throws IOException
mergeRequest
- The merge request of the discussion.discussionId
- The id of the discussion to resolve.noteId
- The id of a discussion note.IOException
- on a GitLab api call errorpublic GitlabCommit getCommit(Serializable projectId, String commitHash) throws IOException
IOException
public List<GitlabCommit> getCommits(GitlabMergeRequest mergeRequest) throws IOException
IOException
public List<GitlabCommit> getCommits(GitlabMergeRequest mergeRequest, Pagination pagination) throws IOException
IOException
public List<GitlabCommit> getLastCommits(Serializable projectId) throws IOException
IOException
public List<GitlabCommit> getLastCommits(Serializable projectId, String branchOrTag) throws IOException
IOException
public List<GitlabCommit> getCommits(Serializable projectId, Pagination pagination, String branchOrTag) throws IOException
IOException
public List<GitlabCommit> getCommits(Serializable projectId, Pagination pagination, String branchOrTag, String path) throws IOException
IOException
public List<GitlabCommit> getAllCommits(Serializable projectId) throws IOException
IOException
public List<GitlabCommit> getAllCommits(Serializable projectId, String branchOrTag) throws IOException
IOException
public List<GitlabCommit> getAllCommits(Serializable projectId, Pagination pagination, String branchOrTag) throws IOException
IOException
public List<GitlabCommitDiff> getCommitDiffs(Serializable projectId, String commitHash) throws IOException
IOException
public List<GitlabCommitDiff> getCommitDiffs(Serializable projectId, String commitHash, Pagination pagination) throws IOException
IOException
public GitlabCommitComparison compareCommits(Serializable projectId, String commitHash1, String commitHash2) throws IOException
IOException
public GitlabCommitComparison compareCommits(Serializable projectId, String commitHash1, String commitHash2, Pagination pagination) throws IOException
IOException
public List<GitlabCommitStatus> getCommitStatuses(GitlabProject project, String commitHash) throws IOException
IOException
public List<GitlabCommitStatus> getCommitStatuses(Serializable projectId, String commitHash) throws IOException
IOException
public List<GitlabCommitStatus> getCommitStatuses(GitlabProject project, String commitHash, Pagination pagination) throws IOException
IOException
public List<GitlabCommitStatus> getCommitStatuses(Serializable projectId, String commitHash, Pagination pagination) throws IOException
IOException
public GitlabCommitStatus createCommitStatus(GitlabProject project, String commitHash, String state, String ref, String name, String targetUrl, String description) throws IOException
IOException
public GitlabCommitStatus createCommitStatus(Serializable projectId, String commitHash, String state, String ref, String name, String targetUrl, String description) throws IOException
IOException
public byte[] getRawFileContent(GitlabProject project, String sha, String filepath) throws IOException
project
- The Projectsha
- The commit or branch namefilepath
- The path of the fileIOException
- on gitlab api call errorpublic byte[] getRawFileContent(Serializable projectId, String sha, String filepath) throws IOException
projectId
- The Projectsha
- The commit or branch namefilepath
- The path of the fileIOException
- on gitlab api call errorpublic byte[] getRawBlobContent(GitlabProject project, String sha) throws IOException
project
- The Projectsha
- The commit or branch nameIOException
- on gitlab api call errorpublic byte[] getFileArchive(GitlabProject project) throws IOException
project
- The ProjectIOException
- on gitlab api call errorpublic List<GitlabRepositoryTree> getRepositoryTree(GitlabProject project, String path, String ref, boolean recursive) throws IOException
project
- The Projectpath
- The path inside the repository. Used to get content of subdirectories (optional)ref
- The name of a repository branch or tag or if not given the default branch (optional)IOException
- on gitlab api call errorpublic GitlabRepositoryFile getRepositoryFile(GitlabProject project, String path, String ref) throws IOException
IOException
public GitlabSimpleRepositoryFile createRepositoryFile(GitlabProject project, String path, String branchName, String commitMsg, String content) throws IOException
project
- The Projectpath
- The file path inside the repositorybranchName
- The name of a repository branchcommitMsg
- The commit messagecontent
- The base64 encoded content of the fileIOException
- on gitlab api call errorpublic GitlabSimpleRepositoryFile updateRepositoryFile(GitlabProject project, String path, String branchName, String commitMsg, String content) throws IOException
project
- The Projectpath
- The file path inside the repositorybranchName
- The name of a repository branchcommitMsg
- The commit messagecontent
- The base64 encoded content of the fileIOException
- on gitlab api call errorpublic void deleteRepositoryFile(GitlabProject project, String path, String branchName, String commitMsg) throws IOException
project
- The Projectpath
- The file path inside the repositorybranchName
- The name of a repository branchcommitMsg
- The commit messageIOException
- on gitlab api call errorpublic GitlabNote updateNote(GitlabMergeRequest mergeRequest, Integer noteId, String body) throws IOException
mergeRequest
- The merge requestnoteId
- The id of the notebody
- The content of the noteIOException
- on gitlab api call errorpublic GitlabNote createNote(GitlabMergeRequest mergeRequest, String body) throws IOException
IOException
public void deleteNote(GitlabMergeRequest mergeRequest, GitlabNote noteToDelete) throws IOException
mergeRequest
- The merge requestnoteToDelete
- The note to deleteIOException
- on gitlab api call errorpublic List<GitlabBranch> getBranches(Serializable projectId)
public List<GitlabBranch> getBranches(GitlabProject project)
public void createBranch(GitlabProject project, String branchName, String ref) throws IOException
project
- The gitlab projectbranchName
- The name of the branch to createref
- The branch name or commit SHA to create branch fromIOException
- on gitlab api call errorpublic void createBranch(Serializable projectId, String branchName, String ref) throws IOException
projectId
- The id of the projectbranchName
- The name of the branch to createref
- The branch name or commit SHA to create branch fromIOException
- on gitlab api call errorpublic void deleteBranch(Serializable projectId, String branchName) throws IOException
projectId
- The id of the projectbranchName
- The name of the branch to deleteIOException
- on gitlab api call errorpublic GitlabBranch getBranch(Serializable projectId, String branchName) throws IOException
IOException
public GitlabBranch getBranch(GitlabProject project, String branchName) throws IOException
IOException
public void protectBranch(GitlabProject project, String branchName) throws IOException
IOException
public void protectBranchWithDeveloperOptions(GitlabProject project, String branchName, boolean developers_can_push, boolean developers_can_merge) throws IOException
IOException
public void unprotectBranch(GitlabProject project, String branchName) throws IOException
IOException
public List<GitlabProjectHook> getProjectHooks(Serializable projectId) throws IOException
IOException
public List<GitlabProjectHook> getProjectHooks(GitlabProject project) throws IOException
IOException
public GitlabProjectHook getProjectHook(GitlabProject project, String hookId) throws IOException
IOException
public GitlabProjectHook addProjectHook(GitlabProject project, String url) throws IOException
IOException
public GitlabProjectHook addProjectHook(GitlabProject project, String url, String token) throws IOException
IOException
public GitlabProjectHook addProjectHook(Serializable projectId, String url, boolean pushEvents, boolean issuesEvents, boolean mergeRequestEvents, boolean noteEvents, boolean tagPushEvents, boolean sslVerification, boolean jobEvents, boolean pipelineEvents, boolean wikiPageEvents, String token) throws IOException
IOException
public GitlabProjectHook addProjectHook(Serializable projectId, String url, GitlabProjectHook hook, String token) throws IOException
IOException
public GitlabProjectHook editProjectHook(GitlabProject project, String hookId, String url, boolean pushEvents, boolean issuesEvents, boolean mergeRequestEvents, boolean noteEvents, boolean tagPushEvents, boolean sslVerification, boolean jobEvents, boolean pipelineEvents, boolean wikiPageEvents, String token) throws IOException
IOException
public GitlabProjectHook editProjectHook(GitlabProject project, GitlabProjectHook projectHook, String token) throws IOException
IOException
public void deleteProjectHook(GitlabProjectHook hook) throws IOException
IOException
public void deleteProjectHook(GitlabProject project, String hookId) throws IOException
IOException
public List<GitlabIssue> getIssues(GitlabProject project)
public List<GitlabIssue> getIssues(Serializable projectId)
public List<GitlabIssue> getIssues(GitlabProject project, GitlabMilestone milestone)
public List<GitlabIssue> getIssues(GitlabGroup group, GitlabMilestone milestone)
public GitlabIssue getIssue(Serializable projectId, Integer issueId) throws IOException
IOException
public GitlabIssueTimeStats getIssueTimeStats(Serializable projectId, Integer issueId) throws IOException
IOException
public GitlabIssue createIssue(int projectId, int assigneeId, Integer milestoneId, String labels, String description, String title) throws IOException
IOException
public GitlabIssue moveIssue(Integer projectId, Integer issueId, Integer toProjectId) throws IOException
IOException
public GitlabIssue editIssue(int projectId, int issueId, int assigneeId, int milestoneId, String labels, String description, String title, GitlabIssue.Action action) throws IOException
IOException
public GitlabNote getNote(GitlabIssue issue, Integer noteId) throws IOException
IOException
public List<GitlabNote> getNotes(GitlabIssue issue) throws IOException
IOException
public GitlabNote createNote(Serializable projectId, Integer issueId, String message) throws IOException
IOException
public GitlabNote createNote(GitlabIssue issue, String message) throws IOException
IOException
public void deleteNote(Serializable projectId, Integer issueId, GitlabNote noteToDelete) throws IOException
projectId
- The project idissueId
- The issue idnoteToDelete
- The note to deleteIOException
- on gitlab api call errorpublic void deleteNote(GitlabIssue issue, GitlabNote noteToDelete) throws IOException
issue
- The issuenoteToDelete
- The note to deleteIOException
- on gitlab api call errorpublic List<GitlabBadge> getProjectBadges(Serializable projectId) throws IOException
projectId
- The id of the project for which the badges should be retrievedIOException
- on GitLab API call errorpublic GitlabBadge getProjectBadge(Serializable projectId, Integer badgeId) throws IOException
projectId
- The id of the project for which the badge should be retrievedbadgeId
- The id of the badge that should be retrievedIOException
- on GitLab API call errorpublic GitlabBadge addProjectBadge(Serializable projectId, String linkUrl, String imageUrl) throws IOException
projectId
- The id of the project for which the badge should be addedlinkUrl
- The URL that the badge should link toimageUrl
- The URL to the badge imageIOException
- on GitLab API call errorpublic GitlabBadge editProjectBadge(Serializable projectId, Integer badgeId, String linkUrl, String imageUrl) throws IOException
projectId
- The id of the project for which the badge should be editedbadgeId
- The id of the badge that should be editedlinkUrl
- The URL that the badge should link toimageUrl
- The URL to the badge imageIOException
- on GitLab API call errorpublic void deleteProjectBadge(Serializable projectId, Integer badgeId) throws IOException
projectId
- The id of the project for which the badge should be deletedbadgeId
- The id of the badge that should be deletedIOException
- on GitLab API call errorpublic List<GitlabBadge> getGroupBadges(Integer groupId) throws IOException
groupId
- The id of the group for which the badges should be retrievedIOException
- on GitLab API call errorpublic GitlabBadge getGroupBadge(Integer groupId, Integer badgeId) throws IOException
groupId
- The id of the group for which the badge should be retrievedbadgeId
- The id of the badge that should be retrievedIOException
- on GitLab API call errorpublic GitlabBadge addGroupBadge(Integer groupId, String linkUrl, String imageUrl) throws IOException
groupId
- The id of the group for which the badge should be addedlinkUrl
- The URL that the badge should link toimageUrl
- The URL to the badge imageIOException
- on GitLab API call errorpublic GitlabBadge editGroupBadge(Integer groupId, Integer badgeId, String linkUrl, String imageUrl) throws IOException
groupId
- The id of the group for which the badge should be editedbadgeId
- The id of the badge that should be editedlinkUrl
- The URL that the badge should link toimageUrl
- The URL to the badge imageIOException
- on GitLab API call errorpublic void deleteGroupBadge(Integer groupId, Integer badgeId) throws IOException
groupId
- The id of the group for which the badge should be deletedbadgeId
- The id of the badge that should be deletedIOException
- on GitLab API call errorpublic List<GitlabLabel> getLabels(Serializable projectId) throws IOException
projectId
- The ID of the project.IOException
- on gitlab api call errorpublic List<GitlabLabel> getLabels(GitlabProject project) throws IOException
project
- The project associated with labels.IOException
- on gitlab api call errorpublic GitlabLabel createLabel(Serializable projectId, String name, String color) throws IOException
projectId
- The ID of the project containing the new label.name
- The name of the label.color
- The color of the label (eg #ff0000).IOException
- on gitlab api call errorpublic GitlabLabel createLabel(Serializable projectId, GitlabLabel label) throws IOException
projectId
- The ID of the project containing the label.label
- The label to create.IOException
public void deleteLabel(Serializable projectId, String name) throws IOException
projectId
- The ID of the project containing the label.name
- The name of the label to delete.IOException
- on gitlab api call errorpublic void deleteLabel(Serializable projectId, GitlabLabel label) throws IOException
projectId
- The ID of the project containing the label.label
- The label to delete.IOException
- on gitlab api call errorpublic GitlabLabel updateLabel(Serializable projectId, String name, String newName, String newColor) throws IOException
projectId
- The ID of the project containing the label.name
- The name of the label to update.newName
- The updated name.newColor
- The updated color.IOException
- on gitlab api call errorpublic List<GitlabMilestone> getMilestones(GitlabProject project) throws IOException
IOException
public List<GitlabMilestone> getMilestones(GitlabGroup group) throws IOException
IOException
public List<GitlabMilestone> getProjectMilestones(Serializable projectId) throws IOException
IOException
public List<GitlabMilestone> getGroupMilestones(Serializable groupId) throws IOException
IOException
public GitlabMilestone createMilestone(Serializable projectId, String title, String description, Date dueDate, Date startDate) throws IOException
projectId
- The ID of the project.title
- The title of the milestone.description
- The description of the milestone. (Optional)dueDate
- The date the milestone is due. (Optional)startDate
- The start date of the milestone. (Optional)IOException
- on gitlab api call errorpublic GitlabMilestone createMilestone(Serializable projectId, GitlabMilestone milestone) throws IOException
projectId
- The ID of the project.milestone
- The milestone to create.IOException
- on gitlab api call errorpublic GitlabMilestone updateMilestone(Serializable projectId, int milestoneId, String title, String description, Date dueDate, Date startDate, String stateEvent) throws IOException
projectId
- The ID of the project.milestoneId
- The ID of the milestone.title
- The title of the milestone. (Optional)description
- The description of the milestone. (Optional)dueDate
- The date the milestone is due. (Optional)startDate
- The start date of the milestone. (Optional)stateEvent
- A value used to update the state of the milestone.
(Optional) (activate | close)IOException
- on gitlab api call errorpublic GitlabMilestone updateMilestone(Serializable projectId, GitlabMilestone edited, String stateEvent) throws IOException
projectId
- The ID of the project.edited
- The already edited milestone.stateEvent
- A value used to update the state of the milestone.
(Optional) (activate | close)IOException
- on gitlab api call errorpublic GitlabMilestone updateMilestone(GitlabMilestone edited, String stateEvent) throws IOException
edited
- The already edited milestone.stateEvent
- A value used to update the state of the milestone.
(Optional) (activate | close)IOException
- on gitlab api call errorpublic GitlabProjectMember addProjectMember(GitlabProject project, GitlabUser user, GitlabAccessLevel accessLevel) throws IOException
project
- the GitlabProjectuser
- the GitlabUseraccessLevel
- the GitlabAccessLevelIOException
- on gitlab api call errorpublic GitlabProjectMember addProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel) throws IOException
projectId
- the project iduserId
- the user idaccessLevel
- the GitlabAccessLevelIOException
- on gitlab api call errorpublic void deleteProjectMember(GitlabProject project, GitlabUser user) throws IOException
project
- the GitlabProjectuser
- the GitlabUserIOException
- on gitlab api call errorpublic void deleteProjectMember(Integer projectId, Integer userId) throws IOException
projectId
- the project iduserId
- the user idIOException
- on gitlab api call errorpublic GitlabProjectMember updateProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel) throws IOException
projectId
- the project iduserId
- the user idaccessLevel
- the updated access level for the specified userIOException
- on Gitlab API call errorpublic GitlabProjectMember updateProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel, String expiresAt) throws IOException
projectId
- the project iduserId
- the user idaccessLevel
- the updated access level for the specified userexpiresAt
- the date at which the user's membership expires at in the form YEAR-MONTH-DAYIOException
- on Gitlab API call errorpublic List<GitlabProjectMember> getProjectMembers(GitlabProject project) throws IOException
IOException
public List<GitlabProjectMember> getProjectMembers(GitlabProject project, Pagination pagination) throws IOException
IOException
public List<GitlabProjectMember> getProjectMembers(Serializable projectId) throws IOException
IOException
public List<GitlabProjectMember> getProjectMembers(Serializable projectId, Pagination pagination) throws IOException
IOException
public List<GitlabProjectMember> getNamespaceMembers(GitlabNamespace namespace) throws IOException
namespace
- The namespaceIOException
- on gitlab api call errorpublic List<GitlabProjectMember> getNamespaceMembers(Integer namespaceId) throws IOException
namespaceId
- Namespace IDIOException
- on gitlab api call errorpublic void transfer(Integer namespaceId, Integer projectId) throws IOException
namespaceId
- Namespace IDprojectId
- Project IDIOException
- on gitlab api call errorpublic GitlabSSHKey createDeployKey(Integer targetProjectId, String title, String key) throws IOException
targetProjectId
- The id of the Gitlab projecttitle
- The title of the ssh keykey
- The public keyIOException
- on gitlab api call errorpublic GitlabSSHKey createPushDeployKey(Integer targetProjectId, String title, String key) throws IOException
targetProjectId
- The id of the Gitlab projecttitle
- The title of the ssh keykey
- The public keyIOException
- on gitlab api call errorpublic void deleteDeployKey(Integer targetProjectId, Integer targetKeyId) throws IOException
targetProjectId
- The id of the Gitlab projecttargetKeyId
- The id of the Gitlab ssh keyIOException
- on gitlab api call errorpublic List<GitlabSSHKey> getDeployKeys(Integer targetProjectId) throws IOException
targetProjectId
- The id of the Gitlab projectIOException
- on gitlab api call errorpublic GitlabSession getCurrentSession() throws IOException
IOException
public List<GitlabSystemHook> getSystemHooks() throws IOException
IOException
- on gitlab api call errorpublic GitlabSystemHook addSystemHook(String url) throws IOException
url
- System hook urlIOException
- on gitlab api call errorpublic void testSystemHook(Integer hookId) throws IOException
IOException
- on gitlab api call errorpublic GitlabSystemHook deleteSystemHook(Integer hookId) throws IOException
IOException
- on gitlab api call errorpublic CommitComment createCommitComment(Serializable projectId, String sha, String note, String path, String line, String line_type) throws IOException
projectId
- (required) - The ID of a projectsha
- (required) - The name of a repository branch or tag or if not given the default branchnote
- (required) - Text of commentpath
- (optional) - The file pathline
- (optional) - The line numberline_type
- (optional) - The line type (new or old)IOException
- on gitlab api call errorpublic List<CommitComment> getCommitComments(Integer projectId, String sha) throws IOException
projectId
- (required) - The ID of a projectsha
- (required) - The name of a repository branch or tag or if not given the default branchIOException
- on gitlab api call errorpublic List<GitlabTag> getTags(Serializable projectId)
projectId
- public List<GitlabTag> getTags(GitlabProject project)
project
- public GitlabTag getTag(GitlabProject project, String tagName) throws IOException
project
- (required) The ID or URL-encoded path of the projecttagName
- (required) The name of the tagIOException
- on gitlab api call errorpublic GitlabTag addTag(Serializable projectId, String tagName, String ref, String message, String releaseDescription) throws IOException
projectId
- tagName
- ref
- message
- releaseDescription
- IOException
- on gitlab api call errorpublic GitlabTag addTag(GitlabProject project, String tagName, String ref, String message, String releaseDescription) throws IOException
project
- tagName
- ref
- message
- releaseDescription
- IOException
- on gitlab api call errorpublic void deleteTag(Serializable projectId, String tagName) throws IOException
projectId
- tagName
- IOException
- on gitlab api call errorpublic void deleteTag(GitlabProject project, String tagName) throws IOException
project
- tagName
- IOException
- on gitlab api call errorpublic List<GitlabAward> getAllAwards(GitlabMergeRequest mergeRequest)
mergeRequest
- public GitlabAward getAward(GitlabMergeRequest mergeRequest, Integer awardId) throws IOException
mergeRequest
- awardId
- IOException
- on gitlab api call errorpublic GitlabAward createAward(GitlabMergeRequest mergeRequest, String awardName) throws IOException
mergeRequest
- awardName
- IOException
- on gitlab api call errorpublic void deleteAward(GitlabMergeRequest mergeRequest, GitlabAward award) throws IOException
mergeRequest
- award
- IOException
- on gitlab api call errorpublic List<GitlabAward> getAllAwards(GitlabIssue issue)
issue
- public GitlabAward getAward(GitlabIssue issue, Integer awardId) throws IOException
issue
- awardId
- IOException
- on gitlab api call errorpublic GitlabAward createAward(GitlabIssue issue, String awardName) throws IOException
issue
- awardName
- IOException
- on gitlab api call errorpublic void deleteAward(GitlabIssue issue, GitlabAward award) throws IOException
issue
- award
- IOException
- on gitlab api call errorpublic List<GitlabAward> getAllAwards(GitlabIssue issue, Integer noteId)
issue
- noteId
- public GitlabAward getAward(GitlabIssue issue, Integer noteId, Integer awardId) throws IOException
issue
- noteId
- awardId
- IOException
- on gitlab api call errorpublic GitlabAward createAward(GitlabIssue issue, Integer noteId, String awardName) throws IOException
issue
- noteId
- awardName
- IOException
- on gitlab api call errorpublic void deleteAward(GitlabIssue issue, Integer noteId, GitlabAward award) throws IOException
issue
- noteId
- award
- IOException
- on gitlab api call errorpublic List<GitlabBuildVariable> getBuildVariables(Integer projectId) throws IOException
projectId
- The ID of the project.IOException
- on gitlab api call errorpublic List<GitlabBuildVariable> getBuildVariables(GitlabProject project) throws IOException
project
- The project associated with variables.IOException
- on gitlab api call errorpublic GitlabBuildVariable getBuildVariable(Integer projectId, String key) throws IOException
projectId
- The ID of the project.key
- The key of the variable.IOException
- on gitlab api call errorpublic GitlabBuildVariable getBuildVariable(GitlabProject project, String key) throws IOException
project
- The project associated with the variable.IOException
- on gitlab api call errorpublic GitlabBuildVariable createBuildVariable(Integer projectId, String key, String value) throws IOException
projectId
- The ID of the project containing the new variable.key
- The key of the variable.value
- The value of the variableIOException
- on gitlab api call errorpublic GitlabBuildVariable createBuildVariable(Integer projectId, GitlabBuildVariable variable) throws IOException
projectId
- The ID of the project containing the variable.variable
- The variable to create.IOException
public void deleteBuildVariable(Integer projectId, String key) throws IOException
projectId
- The ID of the project containing the variable.key
- The key of the variable to delete.IOException
- on gitlab api call errorpublic void deleteBuildVariable(Integer projectId, GitlabBuildVariable variable) throws IOException
projectId
- The ID of the project containing the variable.variable
- The variable to delete.IOException
- on gitlab api call errorpublic GitlabBuildVariable updateBuildVariable(Integer projectId, String key, String newValue) throws IOException
projectId
- The ID of the project containing the variable.key
- The key of the variable to update.newValue
- The updated value.IOException
- on gitlab api call errorpublic List<GitlabTrigger> getPipelineTriggers(GitlabProject project)
project
- the projectIllegalStateException
- if jobs are not enabled for the projectpublic GitlabServiceEmailOnPush getEmailsOnPush(Integer projectId) throws IOException
projectId
- The ID of the project containing the variable.IOException
- on gitlab api call errorpublic boolean updateEmailsOnPush(Integer projectId, String emailAddress) throws IOException
projectId
- The ID of the project containing the variable.emailAddress
- The emailaddress of the recipent who is going to receive push notification.IOException
- on gitlab api call errorpublic GitlabServiceJira getJiraService(Integer projectId) throws IOException
projectId
- The ID of the project containing the variable.IOException
- on gitlab api call errorpublic boolean deleteJiraService(Integer projectId) throws IOException
projectId
- The ID of the project containing the variable.IOException
- on gitlab api call errorpublic boolean createOrEditJiraService(Integer projectId, GitlabJiraProperties jiraPropties) throws IOException
projectId
- The ID of the project containing the variable.jiraPropties
- IOException
- on gitlab api call errorpublic List<GitlabProject> searchProjects(String search) throws IOException
IOException
- on gitlab api call errorpublic void shareProjectWithGroup(GitlabAccessLevel accessLevel, String expiration, GitlabGroup group, GitlabProject project) throws IOException
accessLevel
- The permissions level to grant the group.group
- The group to share with.project
- The project to be shared.expiration
- Share expiration date in ISO 8601 format: 2016-09-26 or null
.IOException
- on gitlab api call errorpublic void deleteSharedProjectGroupLink(GitlabGroup group, GitlabProject project) throws IOException
group
- The group.project
- The project.IOException
- on gitlab api call errorpublic void deleteSharedProjectGroupLink(int groupId, int projectId) throws IOException
groupId
- The group id number.projectId
- The project id number.IOException
- on gitlab api call errorpublic void setUserAgent(String userAgent)
userAgent
- public String getUserAgent()
public GitlabVersion getVersion() throws IOException
IOException
public List<GitlabRunner> getRunners() throws IOException
IOException
- on gitlab api call errorpublic List<GitlabRunner> getRunners(GitlabRunner.RunnerScope scope) throws IOException
scope
- Can be null. Defines type of Runner to retrieve.IOException
- on Gitlab API call errorpublic List<GitlabRunner> getRunnersWithPagination(GitlabRunner.RunnerScope scope, int page, int perPage) throws IOException
scope
- Can be null. Defines type of Runner to retrieve.page
- Page to get perPage number of Runners from.perPage
- Number of elements to get per page.IOException
- on Gitlab API call errorpublic List<GitlabRunner> getRunnersWithPagination(GitlabRunner.RunnerScope scope, Pagination pagination) throws IOException
scope
- Can be null. Defines type of Runner to retrieve.pagination
- Can be null. Pagination to query by.IOException
- on Gitlab API call errorpublic GitlabRunner getRunnerDetail(int id) throws IOException
id
- Runner id.IOException
- on gitlab api call errorpublic List<GitlabEvent> getEvents(GitlabProject project, GitlabEvent.ActionType action, GitlabEvent.TargetType targetType, GitlabDate before, GitlabDate after, SortOrder sortOrder) throws IOException
action
- If not null, include only events of a particular action typetargetType
- If not null, include only events of a particular target typebefore
- If not null, include only events created before a particular date.after
- If not null, include only events created before a
particular date.sortOrder
- If null, uses the server's default, which is "desc"IOException
public List<GitlabEvent> getEvents(GitlabProject project, GitlabEvent.ActionType action, GitlabEvent.TargetType targetType, GitlabDate before, GitlabDate after, SortOrder sortOrder, Pagination pagination) throws IOException
action
- If not null, include only events of a particular action typetargetType
- If not null, include only events of a particular target typebefore
- If not null, include only events created before a particular date.after
- If not null, include only events created before a
particular date.sortOrder
- If null, uses the server's default, which is "desc"IOException
public List<GitlabEvent> getProjectEvents(Serializable projectId, GitlabEvent.ActionType action, GitlabEvent.TargetType targetType, GitlabDate before, GitlabDate after, SortOrder sort) throws IOException
action
- If not null, include only events of a particular action typetargetType
- If not null, include only events of a particular target typebefore
- If not null, include only events created before a particular date.after
- If not null, include only events created before a
particular date.sort
- If null, uses the server's default, which is "desc"IOException
public List<GitlabEvent> getProjectEvents(Serializable projectId, GitlabEvent.ActionType action, GitlabEvent.TargetType targetType, GitlabDate before, GitlabDate after, SortOrder sort, Pagination pagination) throws IOException
action
- If not null, include only events of a particular action typetargetType
- If not null, include only events of a particular target typebefore
- If not null, include only events created before a particular date.after
- If not null, include only events created before a
particular date.sort
- If null, uses the server's default, which is "desc"IOException
Copyright © 2019. All rights reserved.