/** * Updates an existing project milestone. * * @param projectId The ID of the project. * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( Serializable projectId, GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(projectId, edited.getId(), edited.getTitle(), edited.getDescription(), edited.getDueDate(), edited.getStartDate(), stateEvent); }
/** * Updates an existing project milestone. * * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(edited.getProjectId(), edited, stateEvent); }
public List<GitlabIssue> getIssues(GitlabProject project, GitlabMilestone milestone) { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(project.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
private List<String> getMilestones() { List<String> target = new ArrayList<String>(); try { List<GitlabMilestone> milestones = getConnection().getMilestones(); for(GitlabMilestone m : milestones) { target.add(m.getTitle()); } } catch (CoreException e) { } return target; }
public List<GitlabIssue> getIssues(GitlabProject project, GitlabMilestone milestone) { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(project.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
public GitlabMilestone findMilestoneByName(String name) { try { List<GitlabMilestone> milestones = getConnection().getMilestones(); for(GitlabMilestone m : milestones) { if(m.getTitle().equals(name)) { return m; } } } catch (CoreException e) { } return null; }
/** * Creates a new project milestone. * * @param projectId The ID of the project. * @param milestone The milestone to create. * @return The newly created, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone createMilestone( Serializable projectId, GitlabMilestone milestone) throws IOException { String title = milestone.getTitle(); String description = milestone.getDescription(); Date dateDue = milestone.getDueDate(); Date dateStart = milestone.getStartDate(); return createMilestone(projectId, title, description, dateDue, dateStart); }
public List<GitlabIssue> getIssues(GitlabProject project, GitlabMilestone milestone) { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(project.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
(issue.getMilestone() == null || !milestone.equals(issue.getMilestone().getTitle()))) { return false;
/** * Updates an existing project milestone. * * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(edited.getProjectId(), edited, stateEvent); }
/** * Creates a new project milestone. * * @param projectId The ID of the project. * @param milestone The milestone to create. * @return The newly created, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone createMilestone( Serializable projectId, GitlabMilestone milestone) throws IOException { String title = milestone.getTitle(); String description = milestone.getDescription(); Date dateDue = milestone.getDueDate(); Date dateStart = milestone.getStartDate(); return createMilestone(projectId, title, description, dateDue, dateStart); }
public List<GitlabIssue> getIssues(GitlabGroup group, GitlabMilestone milestone) { String tailUrl = GitlabGroup.URL + "/" + sanitizeGroupId(group.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
root.getAttribute(GitlabAttribute.MILESTONE.getTaskKey()).setValue(issue.getMilestone().getTitle());
/** * Updates an existing project milestone. * * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(edited.getProjectId(), edited, stateEvent); }
/** * Creates a new project milestone. * * @param projectId The ID of the project. * @param milestone The milestone to create. * @return The newly created, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone createMilestone( Serializable projectId, GitlabMilestone milestone) throws IOException { String title = milestone.getTitle(); String description = milestone.getDescription(); Date dateDue = milestone.getDueDate(); Date dateStart = milestone.getStartDate(); return createMilestone(projectId, title, description, dateDue, dateStart); }
public List<GitlabIssue> getIssues(GitlabGroup group, GitlabMilestone milestone) { String tailUrl = GitlabGroup.URL + "/" + sanitizeGroupId(group.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
/** * Updates an existing project milestone. * * @param projectId The ID of the project. * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( Serializable projectId, GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(projectId, edited.getId(), edited.getTitle(), edited.getDescription(), edited.getDueDate(), edited.getStartDate(), stateEvent); }
public List<GitlabIssue> getIssues(GitlabGroup group, GitlabMilestone milestone) { String tailUrl = GitlabGroup.URL + "/" + sanitizeGroupId(group.getId()) + GitlabMilestone.URL + "/" + sanitizeMilestoneId(milestone.getId()) + GitlabIssue.URL + PARAM_MAX_ITEMS_PER_PAGE; return retrieve().getAll(tailUrl, GitlabIssue[].class); }
/** * Updates an existing project milestone. * * @param projectId The ID of the project. * @param edited The already edited milestone. * @param stateEvent A value used to update the state of the milestone. * (Optional) (activate | close) * @return The updated, de-serialized milestone. * @throws IOException on gitlab api call error */ public GitlabMilestone updateMilestone( Serializable projectId, GitlabMilestone edited, String stateEvent) throws IOException { return updateMilestone(projectId, edited.getId(), edited.getTitle(), edited.getDescription(), edited.getDueDate(), edited.getStartDate(), stateEvent); }
@Override public GitLabIssueWrapper getIssue(String repository, int id) { try { // Issue String issueUrl = configuration.getUrl() + "/" + repository + GitlabIssue.URL + "/" + id; GitlabIssue issue = api.getIssue(repository, id); // Milestone URL String milestoneUrl = null; if (issue.getMilestone() != null) { milestoneUrl = configuration.getUrl() + "/" + repository + GitlabMilestone.URL + "/" + issue.getMilestone().getId(); } // OK return GitLabIssueWrapper.of(issue, milestoneUrl, issueUrl); } catch (IOException e) { throw new OntrackGitLabClientException(e); } }