Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

#493 linkable versions in release notes, formatting changes #573

Merged
merged 3 commits into from Nov 22, 2017
Merged

#493 linkable versions in release notes, formatting changes #573

merged 3 commits into from Nov 22, 2017

Conversation

micd
Copy link
Contributor

@micd micd commented Nov 20, 2017

Changed formatting in release notes to have linkable versions.

}

def "formats header when regular version"() {
expect:
DetailedFormatter.header("v0.1.0", new Date(1483500000000), true) == "# v0.1.0 (2017-01-04) - "
DetailedFormatter.header("v0.1.0", true) == "# v0.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess now emphasized version would be "#", and a regular one "####". What do you think @mockitoguy ?

private static String buildHeader(String version, Date date, String prefix, String postfix) {
return prefix + version + " (" + DateUtil.formatDate(date) + ")" + postfix + " - ";
private static String buildHeader(String version, String prefix, String postfix) {
return prefix + version + postfix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that postfix is always "" so it's no longer necessary.

authorsSummaryAppendix(contributions, contributors);
static String releaseSummary(Date date, String version, ContributionSet contributions, Map<String, Contributor>
contributors, String vcsCommitsLink, String publicationRepository) {
return " - " + "(" + DateUtil.formatDate(date) + ") "
Copy link
Contributor

@wwilk wwilk Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" - " + "(" can be just " - (".
Also the format is different than the one suggested by the issue submitted. It is:
(2017-11-20) n commits

and should be:
2017-11-20 - n commits

Let's put this date prefix into a private method.

Copy link
Contributor

@wwilk wwilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for such a quick turnaround! Please consider my feedback

@wwilk wwilk merged commit 5cebd9e into mockito:master Nov 22, 2017
@wwilk
Copy link
Contributor

wwilk commented Nov 22, 2017

Thanks for the contribution!

@micd
Copy link
Contributor Author

micd commented Nov 23, 2017

My pleasure!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants