jenkins-infra/plugin-health-scoring

SCMLinkValidationProbe regexp must not have a folder

alecharp opened this issue · 0 comments

Description of the bug

Part of a problem with the maven-release-plugin, the plugins stored in a module shouldn't have a folder.
This is why we have to set the inherite=false on the scm section of the POM files as in https://github.com/jenkinsci/aws-java-sdk-plugin/blob/8b291cfcda0960e5a97fbbd6c9e752049dc3d422/pom.xml#L32.

Because of that, assuming there is a folder part in the SCM link of a plugin is wrong.

private static final String GH_REGEXP = "https://(?<server>[^/]*)/(?<repo>jenkinsci/[^/]*)(?:/(?<folder>.*))?";
needs to be fixed and the probe should now fail when there is such a "folder".

Thanks @aneveux