Skip to content

Commit

Permalink
[FIXED JENKINS-9016] If no Jenkins user is found for the commit's use…
Browse files Browse the repository at this point in the history
…r.name value, use the username section of the email address instead.
  • Loading branch information
abayer committed Apr 13, 2011
1 parent dc575dc commit 3607d2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/hudson/plugins/git/GitChangeSet.java
Expand Up @@ -230,8 +230,11 @@ public User getAuthor() {
throw new RuntimeException("No author in this changeset!");
}

User user = User.get(csAuthor, true);
User user = User.get(csAuthor, false);

if (user == null)
user = User.get(csAuthorEmail.split("@")[0], true);

// set email address for user if needed
if (fixEmpty(csAuthorEmail) != null) {
try {
Expand Down

0 comments on commit 3607d2e

Please sign in to comment.