本文整理汇总了Java中org.kohsuke.github.GHIssue.close方法的典型用法代码示例。如果您正苦于以下问题:Java GHIssue.close方法的具体用法?Java GHIssue.close怎么用?Java GHIssue.close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kohsuke.github.GHIssue
的用法示例。
在下文中一共展示了GHIssue.close方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePendingChanges
import org.kohsuke.github.GHIssue; //导入方法依赖的package包/类
public void updatePendingChanges(CommandContext context, DependenciesCheck check, List<DependencyVersionChange> pendingChanges) throws IOException {
Configuration configuration = context.getConfiguration();
List<DependencyVersionChange> currentPendingChanges = check.getInvalidChanges();
GHRepository ghRepository = context.gitHubRepository();
if (ghRepository != null) {
GHIssue issue = getOrFindIssue(context, ghRepository);
if (currentPendingChanges.equals(pendingChanges)) {
if (issue != null) {
LOG.debug("Pending changes unchanged so not modifying the issue");
}
return;
}
String operationDescrption = getOperationDescription(context);
if (currentPendingChanges.isEmpty()) {
if (issue != null) {
context.info(LOG, "Closing issue as we have no further pending issues " + issue.getHtmlUrl());
issue.comment(Issues.CLOSE_MESSAGE + operationDescrption);
issue.close();
}
return;
}
if (issue == null) {
issue = Issues.createIssue(context, ghRepository);
context.setIssue(issue);
context.info(LOG, configuration.colored(Configuration.COLOR_PENDING, "Created issue " + issue.getHtmlUrl()));
} else {
context.info(LOG, configuration.colored(Configuration.COLOR_PENDING, "Modifying issue " + issue.getHtmlUrl()));
}
Issues.addConflictsComment(issue, currentPendingChanges, operationDescrption, check);
} else {
// TODO what to do with vanilla git repos?
}
}
示例2: removeGHIssue
import org.kohsuke.github.GHIssue; //导入方法依赖的package包/类
public static void removeGHIssue(GHRepository repo, String user, int issueID)
throws IOException {
GHIssue issue = repo.getIssue(issueID);
if (isSlackIssue(issue)) {
issue.comment("Closed by " + user);
issue.close();
}
}
示例3: closeIssues
import org.kohsuke.github.GHIssue; //导入方法依赖的package包/类
public static void closeIssues(List<GHIssue> issues) throws IOException {
for (GHIssue issue : issues) {
issue.close();
}
}