Skip to content

Commit a713b45

Browse files
committed
Remove email addresses from contributors and de-dupe them
1 parent c078213 commit a713b45

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/main/kotlin/org/openrewrite/RecipeMarkdownWriter.kt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -651,17 +651,13 @@ import TabItem from '@theme/TabItem';
651651
private fun BufferedWriter.writeContributors(recipeDescriptor: RecipeDescriptor) {
652652
if (recipeDescriptor.contributors.isNotEmpty()) {
653653
newLine()
654-
writeln("## Contributors")
655-
writeln(
656-
recipeDescriptor.contributors.stream()
657-
.map { contributor: Contributor ->
658-
if (contributor.email.contains("noreply")) {
659-
contributor.name
660-
} else {
661-
"[" + contributor.name + "](mailto:" + contributor.email + ")"
662-
}
663-
}.collect(joining(", "))
664-
)
654+
writeln("## Contributors\n")
655+
// Extract unique contributor names (removing duplicates)
656+
val uniqueNames = recipeDescriptor.contributors
657+
.map { contributor -> contributor.name }
658+
.distinct()
659+
.sorted()
660+
writeln(uniqueNames.joinToString(", "))
665661
}
666662
}
667663

0 commit comments

Comments
 (0)