Skip to content

Commit

Permalink
Fixup to #536 (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Apr 21, 2023
1 parent 3efd78e commit d087503
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/jenkins/tools/test/PluginListerCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
versionProvider = VersionProvider.class)
public class PluginListerCli implements Callable<Integer> {

private static final Pattern PATTERN = Pattern.compile("^https://github.com/(.+?)/(.+?)(\\.git)?$");
private static final Pattern PATTERN = Pattern.compile("^(https|http|git)://github.com/(.+?)/(.+?)(\\.git)?$");

@CommandLine.Option(
names = {"-w", "--war"},
Expand Down Expand Up @@ -91,9 +91,9 @@ public Integer call() throws MetadataExtractionException {
for (Map.Entry<String, List<Plugin>> entry : pluginsByRepository.entrySet()) {
Matcher matcher = PATTERN.matcher(entry.getKey());
if (matcher.find()) {
writer.write(matcher.group(1));
writer.write('/');
writer.write(matcher.group(2));
writer.write('/');
writer.write(matcher.group(3));
} else {
throw new IllegalArgumentException("Invalid GitHub URL: " + entry.getKey());
}
Expand Down

0 comments on commit d087503

Please sign in to comment.