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 mergeRequestId,
String mergeCommitMessage) |
GitlabGroupMember |
addGroupMember(GitlabGroup group,
GitlabUser user,
GitlabAccessLevel accessLevel)
Add a group member.
|
GitlabGroupMember |
addGroupMember(Integer groupId,
Integer userId,
GitlabAccessLevel accessLevel)
Add a group member.
|
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 tagPushEvents,
boolean sslVerification) |
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
|
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) |
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(Integer 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) |
GitlabSSHKey |
createDeployKey(Integer targetProjectId,
String title,
String key)
Create a new deploy key for the project
|
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 |
createGroupViaSudo(String name,
String path,
GitlabUser sudoUser)
Creates a Group
|
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)
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) |
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,
Integer visibilityLevel,
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,
Integer visibilityLevel)
Creates a group Project
|
GitlabSSHKey |
createSSHKey(Integer targetUserId,
String title,
String key)
Create a new ssh key for the 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)
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,
Boolean publik,
Integer visibilityLevel,
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 |
deleteGroup(Integer groupId)
Delete a group.
|
void |
deleteGroupMember(GitlabGroup group,
GitlabUser user)
Delete a group member.
|
void |
deleteGroupMember(Integer groupId,
Integer userId)
Delete a group member.
|
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 |
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 |
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() |
GitlabIssue |
editIssue(int projectId,
int issueId,
int assigneeId,
int milestoneId,
String labels,
String description,
String title,
GitlabIssue.Action action) |
GitlabProjectHook |
editProjectHook(GitlabProject project,
String hookId,
String url) |
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) |
byte[] |
getBuildArtifact(GitlabProject project,
GitlabBuild build)
Get build artifacts of a project build
|
byte[] |
getBuildArtifact(Integer projectId,
Integer buildId)
Get build artifacts of a project build
|
List<GitlabTrigger> |
getBuildTriggers(GitlabProject project)
Returns the list of build triggers for a project.
|
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.
|
GitlabCommit |
getCommit(Serializable projectId,
String commitHash) |
List<GitlabBuild> |
getCommitBuilds(GitlabProject projectId,
String commitHash) |
List<GitlabBuild> |
getCommitBuilds(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<GitlabCommitStatus> |
getCommitStatuses(GitlabProject project,
String commitHash) |
List<GitlabCommitStatus> |
getCommitStatuses(GitlabProject project,
String commitHash,
Pagination pagination) |
GitlabSession |
getCurrentSession() |
List<GitlabSSHKey> |
getDeployKeys(Integer targetProjectId)
Gets all deploy keys for a project
|
GitlabServiceEmailOnPush |
getEmailsOnPush(Integer projectId)
Gets email-on-push service setup for a projectId.
|
byte[] |
getFileArchive(GitlabProject project)
Get an archive of the repository
|
GitlabGroup |
getGroup(Integer groupId) |
GitlabGroup |
getGroup(String path)
Get a group by path
|
List<GitlabGroupMember> |
getGroupMembers(GitlabGroup group)
Gets all members of a Group
|
List<GitlabGroupMember> |
getGroupMembers(Integer groupId)
Gets all members of a Group
|
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) |
GitlabIssue |
getIssue(Serializable projectId,
Integer issueId) |
List<GitlabIssue> |
getIssues(GitlabProject project) |
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) |
GitlabMergeRequest |
getMergeRequest(GitlabProject project,
Integer mergeRequestId) |
GitlabMergeRequest |
getMergeRequestByIid(Serializable projectId,
Integer mergeRequestIid)
Return Merge Request.
|
GitlabMergeRequest |
getMergeRequestChanges(Serializable projectId,
Integer mergeRequestId)
Return a Merge Request including its changes.
|
List<GitlabMergeRequest> |
getMergeRequests(GitlabProject project) |
List<GitlabMergeRequest> |
getMergeRequests(Serializable projectId) |
List<GitlabMilestone> |
getMilestones(GitlabProject project) |
List<GitlabMilestone> |
getMilestones(Serializable projectId) |
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
|
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(Serializable projectId) |
List<GitlabProject> |
getOwnedProjects()
Get a list of projects owned by the authenticated user.
|
GitlabProject |
getProject(Serializable projectId) |
GitlabProject |
getProject(String namespace,
String projectName)
use namespace & project name to get project
|
GitlabBuild |
getProjectBuild(Integer projectId,
Integer buildId)
Gets a build for a project
|
List<GitlabBuild> |
getProjectBuilds(GitlabProject project)
Gets a list of a project's builds in Gitlab
|
List<GitlabBuild> |
getProjectBuilds(Integer projectId)
Gets a list of a project's builds in Gitlab
|
GitlabProjectHook |
getProjectHook(GitlabProject project,
String hookId) |
List<GitlabProjectHook> |
getProjectHooks(GitlabProject project) |
List<GitlabProjectHook> |
getProjectHooks(Serializable projectId) |
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<GitlabProject> |
getProjects()
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.
|
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(Integer 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_name,
boolean recursive)
Get an archive of the repository
|
int |
getRequestTimeout() |
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<GitlabSystemHook> |
getSystemHooks()
Get list of system hooks
|
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() |
GitlabIssue |
moveIssue(Integer projectId,
Integer issueId,
Integer toProjectId) |
void |
protectBranch(GitlabProject project,
String branchName) |
GitlabAPI |
proxy(Proxy proxy) |
GitlabHTTPRequestor |
retrieve() |
List<GitlabProject> |
searchProjects(String query)
Get a list of projects accessible by the authenticated user by search.
|
GitlabAPI |
setRequestTimeout(int requestTimeout) |
void |
setUserAgent(String userAgent)
Set the User-Agent header for the requests.
|
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.
|
GitlabLabel |
updateLabel(Serializable projectId,
String name,
String newName,
String newColor)
Updates an existing label.
|
GitlabMergeRequest |
updateMergeRequest(Serializable projectId,
Integer mergeRequestId,
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,
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,
Boolean publik,
Integer visibilityLevel)
Deprecated.
|
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)
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 GitlabAPI ignoreCertificateErrors(boolean ignoreCertificateErrors)
public int getRequestTimeout()
public GitlabAPI setRequestTimeout(int requestTimeout)
public GitlabHTTPRequestor retrieve()
public GitlabHTTPRequestor dispatch()
public boolean isIgnoreCertificateErrors()
public Proxy getProxy()
public URL getAPIUrl(String tailAPIUrl) throws IOException
IOException
public URL getUrl(String tailAPIUrl) throws IOException
IOException
public List<GitlabUser> getUsers() throws IOException
IOException
public List<GitlabUser> findUsers(String emailOrUsername) throws IOException
emailOrUsername
- Some portion of the email address or usernameIOException
public 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) 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 ConfirmationIOException
- 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) 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 GroupIOException
- 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 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 getGroup(String path) throws IOException
path
- Path of the groupIOException
public List<GitlabGroup> getGroups() throws IOException
IOException
public List<GitlabGroup> getGroupsViaSudo(String username, Pagination pagination) throws IOException
IOException
public List<GitlabProject> getGroupProjects(GitlabGroup group) throws IOException
group
- the target groupIOException
public List<GitlabProject> getGroupProjects(Integer groupId) throws IOException
groupId
- the target group's id.IOException
public List<GitlabGroupMember> getGroupMembers(GitlabGroup group) throws IOException
group
- The GitLab GroupIOException
- on gitlab api call errorpublic List<GitlabGroupMember> getGroupMembers(Integer groupId) throws IOException
groupId
- The id of the GitLab GroupIOException
- on gitlab api call errorpublic 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(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 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 GitlabProject getProject(Serializable projectId) throws IOException
IOException
public GitlabProject getProject(String namespace, String projectName) throws IOException
IOException
public List<GitlabProject> getProjects() throws IOException
IOException
public List<GitlabProject> getOwnedProjects() throws IOException
IOException
public List<GitlabProject> getProjectsViaSudo(GitlabUser user) throws IOException
IOException
public List<GitlabProject> getAllProjects() throws IOException
IOException
public GitlabUpload uploadFile(GitlabProject project, File file) throws IOException
project
- file
- IOException
public List<GitlabBuild> getProjectBuilds(GitlabProject project) throws IOException
project
- the projectIOException
public List<GitlabBuild> getProjectBuilds(Integer projectId) throws IOException
projectId
- the project idIOException
public GitlabBuild getProjectBuild(Integer projectId, Integer buildId) throws IOException
projectId
- the project idbuildId
- the build idIOException
public byte[] getBuildArtifact(GitlabProject project, GitlabBuild build) throws IOException
project
- The Projectbuild
- The buildIOException
- on gitlab api call errorpublic byte[] getBuildArtifact(Integer projectId, Integer buildId) throws IOException
projectId
- The Project's IdbuildId
- The build's IdIOException
- 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, Integer visibilityLevel) throws IOException
name
- The name of the projectgroup
- The group for which the project should be crateddescription
- The project descriptionvisibilityLevel
- 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, Integer visibilityLevel, 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 defaultpublik
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- 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, Boolean publik, Integer visibilityLevel, 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 defaultpublik
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- 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 error@Deprecated public GitlabProject updateProject(Integer projectId, String name, String description, String defaultBranch, Boolean issuesEnabled, Boolean wallEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean publik, Integer visibilityLevel) 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 defaultpublik
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- 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(GitlabProject project) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequests(Serializable projectId) throws IOException
IOException
public List<GitlabMergeRequest> getMergeRequests(GitlabProject project) throws IOException
IOException
public List<GitlabMergeRequest> getAllMergeRequests(GitlabProject project) throws IOException
IOException
public GitlabMergeRequest getMergeRequestByIid(Serializable projectId, Integer mergeRequestIid) throws IOException
projectId
- The id of the projectmergeRequestIid
- The iid of the merge requestIOException
- on gitlab api call errorpublic GitlabMergeRequest getMergeRequestChanges(Serializable projectId, Integer mergeRequestId) throws IOException
projectId
- The id of the projectmergeRequestId
- The id of the merge requestIOException
- on gitlab api call errorpublic GitlabMergeRequest getMergeRequest(GitlabProject project, Integer mergeRequestId) 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 mergeRequestId, String targetBranch, Integer assigneeId, String title, String description, String stateEvent, String labels) throws IOException
projectId
- The id of the projectmergeRequestId
- The 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 mergeRequestId, String mergeCommitMessage) throws IOException
project
- The ProjectmergeRequestId
- Merge Request IDmergeCommitMessage
- optional merge commit message. Null if not setIOException
- on gitlab api call errorpublic 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) throws IOException
IOException
public GitlabCommit getCommit(Serializable projectId, String commitHash) throws IOException
IOException
public List<GitlabBuild> getCommitBuilds(GitlabProject projectId, String commitHash) throws IOException
IOException
public List<GitlabBuild> getCommitBuilds(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> 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(GitlabProject project, 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 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(Integer 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_name, boolean recursive) throws IOException
project
- The Projectpath
- The path inside the repository. Used to get content of subdirectories (optional)ref_name
- 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 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) throws IOException
IOException
public List<GitlabBranch> getBranches(GitlabProject project) throws IOException
IOException
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 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 tagPushEvents, boolean sslVerification) throws IOException
IOException
public GitlabProjectHook editProjectHook(GitlabProject project, String hookId, String url) 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) throws IOException
IOException
public GitlabIssue getIssue(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<GitlabLabel> getLabels(Serializable projectId) throws IOException
projectId
- The ID of the project.IOException
public List<GitlabLabel> getLabels(GitlabProject project) throws IOException
project
- The project associated with labels.IOException
public 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
public 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
public void deleteLabel(Serializable projectId, GitlabLabel label) throws IOException
projectId
- The ID of the project containing the label.label
- The label to delete.IOException
public 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
public List<GitlabMilestone> getMilestones(GitlabProject project) throws IOException
IOException
public List<GitlabMilestone> getMilestones(Serializable projectId) throws IOException
IOException
public GitlabMilestone createMilestone(Serializable projectId, String title, String description, Date dueDate) 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)IOException
public GitlabMilestone createMilestone(Serializable projectId, GitlabMilestone milestone) throws IOException
projectId
- The ID of the project.milestone
- The milestone to create.IOException
public GitlabMilestone updateMilestone(Serializable projectId, int milestoneId, String title, String description, Date dueDate, 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)stateEvent
- A value used to update the state of the milestone.
(Optional) (activate | close)IOException
public 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
public 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
public 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 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 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(Integer 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) throws IOException
projectId
- IOException
- on gitlab api call errorpublic List<GitlabTag> getTags(GitlabProject project) throws IOException
project
- IOException
- 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) throws IOException
mergeRequest
- IOException
- on gitlab api call errorpublic 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) throws IOException
issue
- IOException
- on gitlab api call errorpublic 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) throws IOException
issue
- noteId
- IOException
- on gitlab api call errorpublic 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
public List<GitlabBuildVariable> getBuildVariables(GitlabProject project) throws IOException
project
- The project associated with variables.IOException
public GitlabBuildVariable getBuildVariable(Integer projectId, String key) throws IOException
projectId
- The ID of the project.key
- The key of the variable.IOException
public GitlabBuildVariable getBuildVariable(GitlabProject project, String key) throws IOException
project
- The project associated with the variable.IOException
public 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
public 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
public void deleteBuildVariable(Integer projectId, GitlabBuildVariable variable) throws IOException
projectId
- The ID of the project containing the variable.variable
- The variable to delete.IOException
public 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
public List<GitlabTrigger> getBuildTriggers(GitlabProject project) throws IOException
project
- the projectIllegalStateException
- if builds are not enabled for the projectIOException
public GitlabServiceEmailOnPush getEmailsOnPush(Integer projectId) throws IOException
projectId
- The ID of the project containing the variable.IOException
public 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
public List<GitlabProject> searchProjects(String query) throws IOException
IOException
public void setUserAgent(String userAgent)
userAgent
- public String getUserAgent()
public GitlabVersion getVersion() throws IOException
IOException
Copyright © 2017. All Rights Reserved.