* Iterate previous build of this project and return the last Sonar URL
*/
public static String getLastSonarUrl(AbstractProject<?, ?> project) {
RunList<? extends Run<?, ?>> builds = project.getBuilds();
for (Run<?, ?> run : builds) {
BuildSonarAction action = run.getAction(BuildSonarAction.class);
if (action != null) {
return action.getUrlName();
}
}
return null;
}