Polishing.
Refine commit message keywords, fall back to main as the changelog lower bound. See #194
This commit is contained in:
@@ -488,7 +488,14 @@ public class GitOperations {
|
||||
|
||||
Optional<Tag> fromTag = tags.filter(iteration.getTrain()).findTag(iteration.getIteration());
|
||||
|
||||
Tag tag = fromTag.get();
|
||||
if (!fromTag.isPresent()) {
|
||||
|
||||
// fall back to main
|
||||
return repo.parseCommit(repo.resolve(Branch.MAIN.toString()));
|
||||
}
|
||||
|
||||
Tag tag = fromTag.orElseThrow(() -> new IllegalStateException(
|
||||
String.format("Cannot determine from tag for %s %s", project.getName(), iteration)));
|
||||
|
||||
return repo.parseCommit(repo.resolve(tag.getName()));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class ParsedCommitMessage {
|
||||
private static final Pattern GITHUB_TICKET = Pattern.compile("((?>#|gh-)\\d+)");
|
||||
|
||||
private static final Pattern GITHUB_CLOSE_SYNTAX = Pattern.compile(
|
||||
"(?>closes|closed|close|fixes|fixed|fix|resolves|resolved|resolve|see)[\\s:]*((?>#|gh-)\\d+)",
|
||||
"(?>closes|closed|close|fixes|fixed|fix|resolves|resolved|resolve|see|related to)[\\s:]*((?>#|gh-)\\d+)",
|
||||
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
|
||||
|
||||
private static final Pattern GITHUB_PREFIX_SYNTAX = Pattern.compile("^(#\\d+)");
|
||||
|
||||
Reference in New Issue
Block a user