本文整理汇总了Java中org.eclipse.egit.github.core.service.IssueService.getIssues方法的典型用法代码示例。如果您正苦于以下问题:Java IssueService.getIssues方法的具体用法?Java IssueService.getIssues怎么用?Java IssueService.getIssues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.egit.github.core.service.IssueService
的用法示例。
在下文中一共展示了IssueService.getIssues方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadRequirements
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private List<Issue> loadRequirements() throws IOException {
IssueService iService = new IssueService(client);
Map<String, String> filderdata = new HashMap<String, String>();
filderdata.put(IssueService.FILTER_LABELS, "Software Requirements Document (SRD)");
filderdata.put(IssueService.FILTER_STATE, IssueService.STATE_OPEN);
List<Issue> issues = iService.getIssues(repositoryId, filderdata);
filderdata.put(IssueService.FILTER_STATE, IssueService.STATE_CLOSED);
issues.addAll(iService.getIssues(repositoryId, filderdata));
class IssueComparator implements Comparator<Issue> {
@Override
public int compare(Issue o1, Issue o2) {
return Integer.compare(o1.getNumber(), o2.getNumber());
}
}
Collections.sort(issues, new IssueComparator());
return issues;
}
示例2: loadRequirements
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private List<Issue> loadRequirements() throws IOException {
IssueService iService = new IssueService(client);
Map<String, String> filderdata = new HashMap<String, String>();
filderdata.put(IssueService.FILTER_LABELS, "User Requirements Document (URD)");
filderdata.put(IssueService.FILTER_STATE, IssueService.STATE_OPEN);
List<Issue> issues = iService.getIssues(repositoryId, filderdata);
filderdata.put(IssueService.FILTER_STATE, IssueService.STATE_CLOSED);
issues.addAll(iService.getIssues(repositoryId, filderdata));
class IssueComparator implements Comparator<Issue> {
@Override
public int compare(Issue o1, Issue o2) {
return Integer.compare(o1.getNumber(), o2.getNumber());
}
}
Collections.sort(issues, new IssueComparator());
return issues;
}
示例3: loadDeliverableMap
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private static void loadDeliverableMap(GitHubClient client, RepositoryId repositoryId)
throws IOException {
IssueService iService = new IssueService(client);
for (Issue issue : iService.getIssues(repositoryId, null)) {
deliverables.put(issue.getTitle().substring(0, issue.getTitle().indexOf(' ')),
issue.getNumber());
}
}
示例4: changeLabelName
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
public static void changeLabelName(GitHubClient client, RepositoryId repositoryId,
String labelName, String changedName) throws IOException {
LabelService lservice = new LabelService(client);
IssueService iservice = new IssueService(client);
Label label = lservice.getLabel(repositoryId, labelName.replace(" ", "%20"));
System.out.println(label.getName());
// Create the label with the changed name
Label changedLabel = new Label();
changedLabel.setName(changedName);
changedLabel.setColor(label.getColor());
changedLabel = lservice.createLabel(repositoryId, changedLabel);
// find issues with the existing label
Map<String, String> filterData = new HashMap<String, String>();
filterData.put(IssueService.FILTER_LABELS, label.getName());
List<Issue> issues = iservice.getIssues(repositoryId, filterData);
// label each issue with the changed label
for (Issue issue : issues) {
System.out.println(issue.getTitle());
List<Label> labels = issue.getLabels();
// delete the existing label
for (Iterator<Label> iter = labels.listIterator(); iter.hasNext();) {
Label l = iter.next();
if (l.getName().equals(labelName))
iter.remove();
}
// add the new changed label
labels.add(changedLabel);
issue.setLabels(labels);
iservice.editIssue(repositoryId, issue);
System.out.println(labels.toString());
}
// delete the existing label
lservice.deleteLabel(repositoryId, labelName.replace(" ", "%20"));
}
示例5: getNumTotalIssues
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private int getNumTotalIssues(GitHubClient client, Repo repo) throws IOException {
IssueService issueService = new IssueService(client);
Map<String, String> prefs = new HashMap<String, String>();
//By default, only open issues are shown
prefs.put(IssueService.FILTER_STATE, "all");
//get all issues for this repo
List<Issue> issues = issueService.getIssues(repo.repoOwner, repo.repoName, prefs);
return issues.size();
}
示例6: closeReviewIssue
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
static void closeReviewIssue(GitHubClient client, Repo repo, String reviewer, String comment) throws IOException {
IssueService issueService = new IssueService(client);
for(Issue issue : issueService.getIssues(repo.repoOwner, repo.repoName, null)) {
if(issue.getAssignee() != null) {
if(issue.getTitle().startsWith("Reviewer - ") && issue.getAssignee().getLogin().equals(reviewer)) {
issueService.createComment(repo.repoOwner, repo.repoName, issue.getNumber(), comment);
issue.setState("closed");
issueService.editIssue(repo.repoOwner, repo.repoName, issue);
}
}
}
}
示例7: loadRequirements
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private List<Issue> loadRequirements() throws IOException {
Map<String, String> filderdata = new HashMap<String, String>();
filderdata.put(IssueService.FILTER_LABELS, "User Requirements Document (URD)");
IssueService iService = new IssueService(client);
return iService.getIssues(repositoryId, filderdata);
}
示例8: loadRequirements
import org.eclipse.egit.github.core.service.IssueService; //导入方法依赖的package包/类
private List<Issue> loadRequirements() throws IOException {
Map<String, String> filderdata = new HashMap<String, String>();
filderdata.put(IssueService.FILTER_LABELS, "Software Requirements Document (SRD)");
IssueService iService = new IssueService(client);
return iService.getIssues(repositoryId, filderdata);
}