diff --git a/release-tools/src/main/java/org/springframework/data/release/issues/github/ChangelogGenerator.java b/release-tools/src/main/java/org/springframework/data/release/issues/github/ChangelogGenerator.java index 3eff1ea..130b66a 100644 --- a/release-tools/src/main/java/org/springframework/data/release/issues/github/ChangelogGenerator.java +++ b/release-tools/src/main/java/org/springframework/data/release/issues/github/ChangelogGenerator.java @@ -16,10 +16,13 @@ package org.springframework.data.release.issues.github; +import lombok.Getter; + import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -40,17 +43,20 @@ public class ChangelogGenerator { private static final Pattern ghUserMentionPattern = Pattern.compile("(^|[^\\w`])(@[\\w-]+)"); + @Getter private final Set excludeLabels; + @Getter private final Set excludeContributors; + @Getter private final String contributorsTitle; private final ChangelogSections sections; public ChangelogGenerator() { this.excludeLabels = new HashSet<>(Arrays.asList("type: task")); - this.excludeContributors = Collections.emptySet(); + this.excludeContributors = new LinkedHashSet<>(); this.contributorsTitle = null; this.sections = new ChangelogSections(); } diff --git a/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHub.java b/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHub.java index 92f43b3..b96eb5e 100644 --- a/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHub.java +++ b/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHub.java @@ -553,6 +553,8 @@ public class GitHub extends GitHubSupport implements IssueTracker { DocumentationMetadata documentation = DocumentationMetadata.of(module.getProject(), version); ChangelogGenerator generator = new ChangelogGenerator(); + generator.getExcludeContributors().addAll(properties.getTeam()); + String releaseBody = generator.generate(gitHubIssues, (changelogSection, s) -> s); String documentationLinks = getDocumentationLinks(module, documentation); diff --git a/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHubProperties.java b/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHubProperties.java index bc19186..cdaf7b3 100644 --- a/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHubProperties.java +++ b/release-tools/src/main/java/org/springframework/data/release/issues/github/GitHubProperties.java @@ -20,6 +20,8 @@ import lombok.Data; import lombok.Getter; import lombok.RequiredArgsConstructor; +import java.util.List; + import javax.annotation.PostConstruct; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -30,6 +32,7 @@ import org.springframework.util.Assert; /** * @author Oliver Gierke + * @author Mark Paluch */ @Data @Component @@ -41,6 +44,11 @@ public class GitHubProperties { private String apiUrl; + /** + * Usernames of project team members. + */ + private List team; + public String getUsername() { return gitProperties.getUsername(); } diff --git a/release-tools/src/main/resources/application.properties b/release-tools/src/main/resources/application.properties index f4b5380..4f0d97b 100644 --- a/release-tools/src/main/resources/application.properties +++ b/release-tools/src/main/resources/application.properties @@ -11,15 +11,13 @@ deployment.staging-repository=libs-staging-local deployment.distribution-repository=temp-private-local deployment.username=buildmaster #deployment.password <- local - +github.team=christophstrobl,gregturn,jxblum,mp911de,odrotbohm,schauder,meistermeier,michael-simons,sothawo,daschl,mikereiche,davidkelly # GPG setup gpg.executable=/usr/local/bin/gpg2 # gpg.keyname # gpg.password - # JIRA jira.api-url=https://jira.spring.io - # GitHub github.api-url=https://api.github.com logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(%-20.20logger{19}){cyan}%clr(:){faint} %m%n%wEx