Skip to content

Commit

Permalink
JENKINS-47527 Run regex filter on full name rather than on job name only
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Shevtsov authored and a-shevtsov committed Oct 24, 2017
1 parent 201ee2a commit 94f9d9e
Showing 1 changed file with 9 additions and 9 deletions.
Expand Up @@ -361,8 +361,16 @@ public Collection<JobStatus> getAllJobsStatuses() {
|| j.getClass().getName().equals("hudson.maven.MavenModule"))
continue;

// Decode pipeline branch names
String fullName = j.getFullName();
try {
fullName = URLDecoder.decode(j.getFullName(), "UTF-8");
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}

// If filtering is enabled, skip jobs not matching the filter
if (r != null && !r.matcher(j.getName()).find())
if (r != null && !r.matcher(fullName).find())
continue;

if (j.isBuilding()) {
Expand All @@ -379,14 +387,6 @@ public Collection<JobStatus> getAllJobsStatuses() {
}
}

// Decode pipeline branch names
String fullName = j.getFullName();
try {
fullName = URLDecoder.decode(j.getFullName(), "UTF-8");
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}

statuses.add(new JobStatus(fullName, status));
}

Expand Down

0 comments on commit 94f9d9e

Please sign in to comment.