Package org.gitlab4j.api
Class MilestonesApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.MilestonesApi
-
- All Implemented Interfaces:
org.gitlab4j.models.Constants
public class MilestonesApi extends AbstractApi
This class implements the client side API for the GitLab milestones calls.- See Also:
- Project milestones API, Group milestones API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.models.Constants
org.gitlab4j.models.Constants.ActionType, org.gitlab4j.models.Constants.ApplicationScope, org.gitlab4j.models.Constants.ArchiveFormat, org.gitlab4j.models.Constants.AutoDevopsDeployStrategy, org.gitlab4j.models.Constants.BuildGitStrategy, org.gitlab4j.models.Constants.CommitBuildState, org.gitlab4j.models.Constants.ContributorOrderBy, org.gitlab4j.models.Constants.DefaultBranchProtectionLevel, org.gitlab4j.models.Constants.DeploymentOrderBy, org.gitlab4j.models.Constants.DeploymentStatus, org.gitlab4j.models.Constants.DeployTokenScope, org.gitlab4j.models.Constants.Encoding, org.gitlab4j.models.Constants.EpicOrderBy, org.gitlab4j.models.Constants.EventScope, org.gitlab4j.models.Constants.GroupOrderBy, org.gitlab4j.models.Constants.GroupSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.ImpersonationState, org.gitlab4j.models.Constants.IssueOrderBy, org.gitlab4j.models.Constants.IssueScope, org.gitlab4j.models.Constants.IssueState, org.gitlab4j.models.Constants.JobScope, org.gitlab4j.models.Constants.LineType, org.gitlab4j.models.Constants.MergeRequestOrderBy, org.gitlab4j.models.Constants.MergeRequestScope, org.gitlab4j.models.Constants.MergeRequestSearchIn, org.gitlab4j.models.Constants.MergeRequestState, org.gitlab4j.models.Constants.MilestoneState, org.gitlab4j.models.Constants.PackageOrderBy, org.gitlab4j.models.Constants.PackageStatus, org.gitlab4j.models.Constants.PipelineOrderBy, org.gitlab4j.models.Constants.PipelineScope, org.gitlab4j.models.Constants.PipelineSource, org.gitlab4j.models.Constants.ProjectAccessTokenScope, org.gitlab4j.models.Constants.ProjectCreationLevel, org.gitlab4j.models.Constants.ProjectOrderBy, org.gitlab4j.models.Constants.ProjectSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SortOrder, org.gitlab4j.models.Constants.SquashOption, org.gitlab4j.models.Constants.StateEvent, org.gitlab4j.models.Constants.SubgroupCreationLevel, org.gitlab4j.models.Constants.TagOrderBy, org.gitlab4j.models.Constants.TargetType, org.gitlab4j.models.Constants.TodoAction, org.gitlab4j.models.Constants.TodoState, org.gitlab4j.models.Constants.TodoType, org.gitlab4j.models.Constants.TokenType
-
-
Field Summary
-
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
-
-
Constructor Summary
Constructors Constructor Description MilestonesApi(GitLabApi gitLabApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.gitlab4j.api.models.Milestone
activateGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Activate a group milestone.org.gitlab4j.api.models.Milestone
activateMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Activate a milestone.org.gitlab4j.api.models.Milestone
closeGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Close a group milestone.org.gitlab4j.api.models.Milestone
closeMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Close a milestone.org.gitlab4j.api.models.Milestone
createGroupMilestone(java.lang.Object groupIdOrPath, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate)
Create a group milestone.org.gitlab4j.api.models.Milestone
createMilestone(java.lang.Object projectIdOrPath, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate)
Create a milestone.void
deleteMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Delete a project milestone.java.util.List<org.gitlab4j.api.models.Issue>
getGroupIssues(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Get the list of issues associated with the specified group milestone.Pager<org.gitlab4j.api.models.Issue>
getGroupIssues(java.lang.Object groupIdOrPath, java.lang.Long milestoneId, int itemsPerPage)
Get the Pager of issues associated with the specified group milestone.java.util.stream.Stream<org.gitlab4j.api.models.Issue>
getGroupIssuesStream(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Get a Stream of issues associated with the specified group milestone.java.util.List<org.gitlab4j.api.models.MergeRequest>
getGroupMergeRequest(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Get the list of merge requests associated with the specified group milestone.org.gitlab4j.api.models.Milestone
getGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId)
Get the specified group milestone.java.util.List<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath)
Get a list of group milestones.Pager<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath, int itemsPerPage)
Get a Page of group milestones.java.util.List<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath, int page, int perPage)
Get a list of group milestones.java.util.List<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath, java.lang.String search)
Get a list of group milestones that have match the search string.java.util.List<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.MilestoneState state)
Get a list of group milestones that have the specified state.java.util.List<org.gitlab4j.api.models.Milestone>
getGroupMilestones(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.MilestoneState state, java.lang.String search)
Get a list of group milestones that have the specified state and match the search string.java.util.stream.Stream<org.gitlab4j.api.models.Milestone>
getGroupMilestonesStream(java.lang.Object groupIdOrPath)
Get a Stream of group milestones.java.util.List<org.gitlab4j.api.models.Issue>
getIssues(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Get the list of issues associated with the specified milestone.Pager<org.gitlab4j.api.models.Issue>
getIssues(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, int itemsPerPage)
Get a Pager of issues associated with the specified milestone.java.util.stream.Stream<org.gitlab4j.api.models.Issue>
getIssuesStream(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Get a Stream of issues associated with the specified milestone.java.util.List<org.gitlab4j.api.models.MergeRequest>
getMergeRequest(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Get the list of merge requests associated with the specified milestone.Pager<org.gitlab4j.api.models.MergeRequest>
getMergeRequest(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, int itemsPerPage)
Get a Pager of merge requests associated with the specified milestone.java.util.stream.Stream<org.gitlab4j.api.models.MergeRequest>
getMergeRequestStream(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Get a Stream of merge requests associated with the specified milestone.org.gitlab4j.api.models.Milestone
getMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId)
Get the specified milestone.java.util.List<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath)
Get a list of project milestones.Pager<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath, int itemsPerPage)
Get a Pager of project milestones.java.util.List<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath, int page, int perPage)
Get a list of project milestones.java.util.List<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath, java.lang.String search)
Get a list of project milestones that have match the search string.java.util.List<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.MilestoneState state)
Get a list of project milestones that have the specified state.java.util.List<org.gitlab4j.api.models.Milestone>
getMilestones(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.MilestoneState state, java.lang.String search)
Get a list of project milestones that have the specified state and match the search string.java.util.stream.Stream<org.gitlab4j.api.models.Milestone>
getMilestonesStream(java.lang.Object projectIdOrPath)
Get a Stream of project milestones.org.gitlab4j.api.models.Milestone
updateGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate, org.gitlab4j.models.Constants.MilestoneState milestoneState)
Update the specified group milestone.org.gitlab4j.api.models.Milestone
updateMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate, org.gitlab4j.models.Constants.MilestoneState milestoneState)
Update the specified milestone.-
Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getNamespaceIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
MilestonesApi
public MilestonesApi(GitLabApi gitLabApi)
-
-
Method Detail
-
getGroupMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath) throws GitLabApiException
Get a list of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instance- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath, int page, int perPage) throws GitLabApiException
Get a list of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancepage
- the page number to getperPage
- how many milestones per page- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public Pager<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath, int itemsPerPage) throws GitLabApiException
Get a Page of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instanceitemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestonesStream
public java.util.stream.Stream<org.gitlab4j.api.models.Milestone> getGroupMilestonesStream(java.lang.Object groupIdOrPath) throws GitLabApiException
Get a Stream of group milestones.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instance- Returns:
- a Stream of the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.MilestoneState state) throws GitLabApiException
Get a list of group milestones that have the specified state.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancestate
- the milestone state- Returns:
- the milestones associated with the specified group and state
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath, java.lang.String search) throws GitLabApiException
Get a list of group milestones that have match the search string.GitLab Endpoint: GET /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancesearch
- the search string- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getGroupMilestones(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.MilestoneState state, java.lang.String search) throws GitLabApiException
Get a list of group milestones that have the specified state and match the search string.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancestate
- the milestone statesearch
- the search string- Returns:
- the milestones associated with the specified group
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMilestone
public org.gitlab4j.api.models.Milestone getGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the ID of the milestone tp get- Returns:
- a Milestone instance for the specified IDs
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssues
public java.util.List<org.gitlab4j.api.models.Issue> getGroupIssues(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the list of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a List of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssues
public Pager<org.gitlab4j.api.models.Issue> getGroupIssues(java.lang.Object groupIdOrPath, java.lang.Long milestoneId, int itemsPerPage) throws GitLabApiException
Get the Pager of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues foritemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- a Pager of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupIssuesStream
public java.util.stream.Stream<org.gitlab4j.api.models.Issue> getGroupIssuesStream(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get a Stream of issues associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/issues
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a Stream of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getGroupMergeRequest
public java.util.List<org.gitlab4j.api.models.MergeRequest> getGroupMergeRequest(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the list of merge requests associated with the specified group milestone.GitLab Endpoint: GET /groups/:id/milestones/:milestone_id/merge_requests
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a list of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
createGroupMilestone
public org.gitlab4j.api.models.Milestone createGroupMilestone(java.lang.Object groupIdOrPath, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate) throws GitLabApiException
Create a group milestone.GitLab Endpoint: POST /groups/:id/milestones
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancetitle
- the title for the milestonedescription
- the description for the milestonedueDate
- the due date for the milestonestartDate
- the start date for the milestone- Returns:
- the created Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
closeGroupMilestone
public org.gitlab4j.api.models.Milestone closeGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Close a group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to close- Returns:
- the closed Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
activateGroupMilestone
public org.gitlab4j.api.models.Milestone activateGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Activate a group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to activate- Returns:
- the activated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateGroupMilestone
public org.gitlab4j.api.models.Milestone updateGroupMilestone(java.lang.Object groupIdOrPath, java.lang.Long milestoneId, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate, org.gitlab4j.models.Constants.MilestoneState milestoneState) throws GitLabApiException
Update the specified group milestone.GitLab Endpoint: PUT /groups/:id/milestones/:milestone_id
- Parameters:
groupIdOrPath
- the group in the form of an Long(ID), String(path), or Group instancemilestoneId
- the milestone ID to updatetitle
- the updated title for the milestonedescription
- the updated description for the milestonedueDate
- the updated due date for the milestonestartDate
- the updated start date for the milestonemilestoneState
- the updated milestone state- Returns:
- the updated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath) throws GitLabApiException
Get a list of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath, int page, int perPage) throws GitLabApiException
Get a list of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepage
- the page number to getperPage
- how many milestones per page- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public Pager<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
Get a Pager of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- The number of Milestone instances that will be fetched per page- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestonesStream
public java.util.stream.Stream<org.gitlab4j.api.models.Milestone> getMilestonesStream(java.lang.Object projectIdOrPath) throws GitLabApiException
Get a Stream of project milestones.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance- Returns:
- a Stream of the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.MilestoneState state) throws GitLabApiException
Get a list of project milestones that have the specified state.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancestate
- the milestone state- Returns:
- the milestones associated with the specified project and state
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath, java.lang.String search) throws GitLabApiException
Get a list of project milestones that have match the search string.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancesearch
- the search string- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestones
public java.util.List<org.gitlab4j.api.models.Milestone> getMilestones(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.MilestoneState state, java.lang.String search) throws GitLabApiException
Get a list of project milestones that have the specified state and match the search string.GitLab Endpoint: GET /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancestate
- the milestone statesearch
- the search string- Returns:
- the milestones associated with the specified project
- Throws:
GitLabApiException
- if any exception occurs
-
getMilestone
public org.gitlab4j.api.models.Milestone getMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the ID of the milestone tp get- Returns:
- a Milestone instance for the specified IDs
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
public java.util.List<org.gitlab4j.api.models.Issue> getIssues(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the list of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a List of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getIssues
public Pager<org.gitlab4j.api.models.Issue> getIssues(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, int itemsPerPage) throws GitLabApiException
Get a Pager of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues foritemsPerPage
- the number of Milestone instances that will be fetched per page- Returns:
- a Pager of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getIssuesStream
public java.util.stream.Stream<org.gitlab4j.api.models.Issue> getIssuesStream(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get a Stream of issues associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/issues
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the issues for- Returns:
- a Stream of Issue for the milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getMergeRequest
public java.util.List<org.gitlab4j.api.models.MergeRequest> getMergeRequest(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get the list of merge requests associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/merge_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a list of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getMergeRequest
public Pager<org.gitlab4j.api.models.MergeRequest> getMergeRequest(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, int itemsPerPage) throws GitLabApiException
Get a Pager of merge requests associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/merge_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a Pager of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
getMergeRequestStream
public java.util.stream.Stream<org.gitlab4j.api.models.MergeRequest> getMergeRequestStream(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Get a Stream of merge requests associated with the specified milestone.GitLab Endpoint: GET /projects/:id/milestones/:milestone_id/merge_requests
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to get the merge requests for- Returns:
- a Stream of merge requests associated with the specified milestone
- Throws:
GitLabApiException
- if any exception occurs
-
createMilestone
public org.gitlab4j.api.models.Milestone createMilestone(java.lang.Object projectIdOrPath, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate) throws GitLabApiException
Create a milestone.GitLab Endpoint: POST /projects/:id/milestones
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancetitle
- the title for the milestonedescription
- the description for the milestonedueDate
- the due date for the milestonestartDate
- the start date for the milestone- Returns:
- the created Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
closeMilestone
public org.gitlab4j.api.models.Milestone closeMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Close a milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to close- Returns:
- the closed Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
activateMilestone
public org.gitlab4j.api.models.Milestone activateMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Activate a milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to activate- Returns:
- the activated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateMilestone
public org.gitlab4j.api.models.Milestone updateMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId, java.lang.String title, java.lang.String description, java.util.Date dueDate, java.util.Date startDate, org.gitlab4j.models.Constants.MilestoneState milestoneState) throws GitLabApiException
Update the specified milestone.GitLab Endpoint: PUT /projects/:id/milestones/:milestone_id
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to updatetitle
- the updated title for the milestonedescription
- the updated description for the milestonedueDate
- the updated due date for the milestonestartDate
- the updated start date for the milestonemilestoneState
- the updated milestone state- Returns:
- the updated Milestone instance
- Throws:
GitLabApiException
- if any exception occurs
-
deleteMilestone
public void deleteMilestone(java.lang.Object projectIdOrPath, java.lang.Long milestoneId) throws GitLabApiException
Delete a project milestone.- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancemilestoneId
- the milestone ID to delete- Throws:
GitLabApiException
- if any exception occurs
-
-