当前位置: 首页>>代码示例>>Java>>正文


Java GHIssue.close方法代码示例

本文整理汇总了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?
    }
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:34,代码来源:ModifyFilesCommandSupport.java

示例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();
	}
}
 
开发者ID:eraether,项目名称:WatchWordBot,代码行数:9,代码来源:GitHubHelper.java

示例3: closeIssues

import org.kohsuke.github.GHIssue; //导入方法依赖的package包/类
public static void closeIssues(List<GHIssue> issues) throws IOException {
    for (GHIssue issue : issues) {
        issue.close();
    }
}
 
开发者ID:fabric8-updatebot,项目名称:updatebot,代码行数:6,代码来源:GitHubHelpers.java


注:本文中的org.kohsuke.github.GHIssue.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。