diff --git a/src/main/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGenerator.java b/src/main/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGenerator.java index fb646bb..5c1bffd 100644 --- a/src/main/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGenerator.java +++ b/src/main/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGenerator.java @@ -23,7 +23,7 @@ class ArtifactIdTeamNameGenerator implements TeamNameGenerator { public String generate(TeamNameInput input) { String artifactId = input.getArtifactId(); String withoutParent = artifactId; - if (artifactId.endsWith("-parent")) { + if (artifactId.endsWith("-parent") || artifactId.endsWith("-plugin")) { withoutParent = artifactId.substring(0, artifactId.lastIndexOf('-')); } return ("@jenkinsci/" + (withoutParent + "-plugin-developers")).toLowerCase(Locale.ROOT); diff --git a/src/test/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGeneratorTest.java b/src/test/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGeneratorTest.java index de3815d..e41ffc5 100644 --- a/src/test/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGeneratorTest.java +++ b/src/test/java/org/openrewrite/jenkins/github/ArtifactIdTeamNameGeneratorTest.java @@ -29,6 +29,10 @@ class ArtifactIdTeamNameGeneratorTest { "stashNotifier,@jenkinsci/stashnotifier-plugin-developers", "aws-java-sdk-parent,@jenkinsci/aws-java-sdk-plugin-developers", "warnings-ng-parent,@jenkinsci/warnings-ng-plugin-developers", + "build-user-vars-plugin,@jenkinsci/build-user-vars-plugin-developers", + "project-stats-plugin,@jenkinsci/project-stats-plugin-developers", + "plugin-usage-plugin,@jenkinsci/plugin-usage-plugin-developers", + "build-keeper-plugin,@jenkinsci/build-keeper-plugin-developers", }) void shouldGenerateExpectedTeamName(String artifactId, String expected) { String actual = generator.generate(new TeamNameInput(artifactId));