Permalink
Browse files

Add system config option to avoid doing user lookup for changelog ent…

…ries to resolve JENKINS-35484
  • Loading branch information...
svanoort committed Jun 9, 2016
1 parent 058e4a6 commit 647f03fc8cdb7422af259d78e96173491df7dad1
Showing with 4 additions and 1 deletion.
  1. +4 −1 rest-api/src/main/java/com/cloudbees/workflow/rest/external/ChangeSetExt.java
@@ -45,6 +45,9 @@
private List<Commit> commits;
private String consoleUrl; // Not a rest endpoint so not including in _links

/** False by default, workaround for JENKINS-35484 where user lookup breaks things */
private static boolean AVOID_RESOLVING_COMMIT_AUTHORS = Boolean.getBoolean(ChangeSetExt.class.getName()+".avoidResolvingCommitAuthors");

public String getKind() {
return kind;
}
@@ -173,7 +176,7 @@ protected void mapFields(ChangeLogSet<? extends ChangeLogSet.Entry> changeset, W
commit.setCommitId(entry.getCommitId());
commit.setCommitUrl(repoUrl);
commit.setMessage(entry.getMsg());
commit.setAuthorJenkinsId(entry.getAuthor().getFullName());
commit.setAuthorJenkinsId((AVOID_RESOLVING_COMMIT_AUTHORS) ? "Unidentified" : entry.getAuthor().getFullName());
commit.setTimestamp(entry.getTimestamp());

if (commit.getTimestamp() > -1) {

0 comments on commit 647f03f

Please sign in to comment.