public static void addConflictsComment(GHIssue issue, List<DependencyVersionChange> pendingChanges, String operationDescription, DependenciesCheck check) throws IOException { String prefix = PENDING_CHANGE_COMMENT_PREFIX + operationDescription + "\n"; String issueComment = prefix + conflictChangesComment(pendingChanges, check); issue.comment(issueComment); }
public static void addConflictsComment(GHIssue issue, List<DependencyVersionChange> pendingChanges, String operationDescription, DependenciesCheck check) throws IOException { String prefix = PENDING_CHANGE_COMMENT_PREFIX + operationDescription + "\n"; String issueComment = prefix + conflictChangesComment(pendingChanges, check); issue.comment(issueComment); }
public FormValidation doTestComment( @QueryParameter("serverAPIUrl") final String serverAPIUrl, @QueryParameter("credentialsId") final String credentialsId, @QueryParameter("repo") final String repoName, @QueryParameter("issueId") final int issueId, @QueryParameter("message1") final String comment) { try { GitHubBuilder builder = getBuilder(null, serverAPIUrl, credentialsId); if (builder == null) { return FormValidation.error("Unable to look up GitHub credentials using ID: " + credentialsId + "!!"); } GitHub gh = builder.build(); GHRepository repo = gh.getRepository(repoName); GHIssue issue = repo.getIssue(issueId); issue.comment(comment); return FormValidation.ok("Issued comment to issue: " + issue.getHtmlUrl()); } catch (Exception ex) { return FormValidation.error("Unable to issue comment: " + ex); } }
@Override public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException { if (getStatusVerifier() != null && !getStatusVerifier().isRunAllowed(run)) { return; } //TODO is this check of Jenkins public url necessary? //String publishedURL = getTriggerDescriptor().getPublishedURL(); //if (publishedURL != null && !publishedURL.isEmpty()) { //TODO are replaceMacros, makebuildMessage needed? String message = comment.expandAll(run, listener); // Only post the build's custom message if it has been set. if (message != null && !message.isEmpty()) { try { getGhPullRequest(run).comment(message); } catch (IOException ex) { LOGGER.error("Couldn't add comment to pull request #{}: '{}'", getPRNumberFromPRCause(run), message, ex); handlePublisherError(run); } listener.getLogger().println(message); } }
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();
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();