From 53209c9e5da9c75192155671eb5cde8c5f0e88df Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Sun, 23 May 2021 09:52:28 +0200 Subject: [PATCH] feat: support semantic versioning (refs #92) --- CHANGELOG.md | 448 ++--- README.md | 2 +- .../gitchangelog/api/GitChangelogApi.java | 134 +- .../internal/settings/Settings.java | 107 +- .../semantic/SemanticVersion.java | 42 + .../semantic/SemanticVersioning.java | 94 + .../api/HandlebarsHelperTest.java | 33 + ...erCanBeSuppliedWithJavascript.approved.txt | 1612 +++++++++++++++++ .../semantic/SemanticVersioningTest.java | 67 + ...HelperCanBeSuppliedWithJavascript.mustache | 10 + 10 files changed, 2283 insertions(+), 266 deletions(-) create mode 100644 src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersion.java create mode 100644 src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersioning.java create mode 100644 src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.java create mode 100644 src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.testThatHelperCanBeSuppliedWithJavascript.approved.txt create mode 100644 src/test/java/se/bjurr/gitchangelog/semantic/SemanticVersioningTest.java create mode 100644 src/test/resources/templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d35522..e7b629c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,45 @@ +# Changelog -# git-changelog-lib changelog +Changelog for tomasbjerre git-changelog-lib. + +## Next release +### GitHub [#92](https://github.com/tomasbjerre/git-changelog-lib/issues/92) Add support for Changelog context pre-processing. *enhancement* + +**feat: support semantic versioning (refs )** + + +[788448e8fd22274](https://github.com/tomasbjerre/git-changelog-lib/commit/788448e8fd22274) Tomas Bjerre *2021-05-23 08:43:06* + + +### Other changes + +**Updating changelog with 1.144.5 [GRADLE SCRIPT]** + + +[a84cd31379958b4](https://github.com/tomasbjerre/git-changelog-lib/commit/a84cd31379958b4) Tomas Bjerre *2021-04-02 18:49:00* + + +## 1.144.5 +### Other changes + +**New version: 1.144.5 [GRADLE SCRIPT]** + + +[7dbfc1d40286730](https://github.com/tomasbjerre/git-changelog-lib/commit/7dbfc1d40286730) Tomas Bjerre *2021-04-02 18:48:55* + +**Updating changelog with 1.144.4 [GRADLE SCRIPT]** + + +[be739eb87c78a07](https://github.com/tomasbjerre/git-changelog-lib/commit/be739eb87c78a07) Tomas Bjerre *2021-04-02 18:47:49* -Changelog of git-changelog-lib. ## 1.144.4 -### No issue +### Other changes + +**New version: 1.144.4 [GRADLE SCRIPT]** + + +[7c1c366efc6363a](https://github.com/tomasbjerre/git-changelog-lib/commit/7c1c366efc6363a) Tomas Bjerre *2021-04-02 18:39:05* **using new build script** @@ -22,26 +57,29 @@ Changelog of git-changelog-lib. ## 1.95 -### No issue +### Jira mediawiki-1 -**Removing default ignore filter on message** +**Switching to Handlebars from Mustache** -* It was: `^\[maven-release-plugin\].*|^\[Gradle Release Plugin\].*|^Merge.*"` -* But users are confused by this and it is probably better to have no filter by default. + * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with--28-api + * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r. + * Refactoring tests to use Approvals. -[a57e321f08cea10](https://github.com/tomasbjerre/git-changelog-lib/commit/a57e321f08cea10) Tomas Bjerre *2021-01-18 16:46:13* +[7eba3d038b884b8](https://github.com/tomasbjerre/git-changelog-lib/commit/7eba3d038b884b8) Tomas Bjerre *2020-12-24 07:11:41* -**Switching to Handlebars from Mustache** -* Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api -* Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r. -* Refactoring tests to use Approvals. +### Other changes -[7eba3d038b884b8](https://github.com/tomasbjerre/git-changelog-lib/commit/7eba3d038b884b8) Tomas Bjerre *2020-12-24 07:11:41* +**Removing default ignore filter on message** + + * It was: `^\[maven-release-plugin\].*|^\[Gradle Release Plugin\].*|^Merge.*"` + * But users are confused by this and it is probably better to have no filter by default. + +[a57e321f08cea10](https://github.com/tomasbjerre/git-changelog-lib/commit/a57e321f08cea10) Tomas Bjerre *2021-01-18 16:46:13* ## 1.94 -### GitHub #94 +### GitHub [#94](https://github.com/tomasbjerre/git-changelog-lib/pull/94) Add an option to filter the commits using a path filter string **Adjustments after merge of PR** @@ -49,17 +87,17 @@ Changelog of git-changelog-lib. [6e07d0b76da227e](https://github.com/tomasbjerre/git-changelog-lib/commit/6e07d0b76da227e) Tomas Bjerre *2020-11-18 17:14:10* -### No issue +### Other changes **Add an option to filter the commits using a path filter string** -* This works exactly like `git log -- path` + * This works exactly like `git log -- path` [94df887471f9f97](https://github.com/tomasbjerre/git-changelog-lib/commit/94df887471f9f97) Gabriel Einsdorf *2020-11-18 13:48:10* ## 1.93 -### No issue +### Other changes **Support custom headers to JIRA to bypass 2 factor auth** @@ -68,7 +106,7 @@ Changelog of git-changelog-lib. ## 1.92 -### GitHub #78 +### GitHub [#78](https://github.com/tomasbjerre/git-changelog-lib/pull/78) add support for jira tokens **naming in api tomasbjerre/git-changelog-lib** @@ -76,7 +114,7 @@ Changelog of git-changelog-lib. [21ef6027c82814e](https://github.com/tomasbjerre/git-changelog-lib/commit/21ef6027c82814e) Tomas Bjerre *2020-02-20 16:31:35* -### No issue +### Other changes **add support for jira tokens** @@ -95,7 +133,7 @@ Changelog of git-changelog-lib. ## 1.91 -### No issue +### Other changes **Removing dependency on javax.xml** @@ -104,7 +142,7 @@ Changelog of git-changelog-lib. ## 1.90 -### GitHub #73 +### GitHub [#73](https://github.com/tomasbjerre/git-changelog-lib/issues/73) git log showing a commit bit plugin saying commit not found. **Clearer exception stacktrace** @@ -112,7 +150,7 @@ Changelog of git-changelog-lib. [0a8d3dc6aa79b1d](https://github.com/tomasbjerre/git-changelog-lib/commit/0a8d3dc6aa79b1d) Tomas Bjerre *2019-05-17 05:03:23* -### No issue +### Other changes **JDK 11 compatible** @@ -126,7 +164,7 @@ Changelog of git-changelog-lib. ## 1.89 -### No issue +### Other changes **Avoiding global state in JiraClientFactory** @@ -135,7 +173,7 @@ Changelog of git-changelog-lib. ## 1.88 -### No issue +### Other changes **Setting version to fix faulty release** @@ -164,7 +202,7 @@ Changelog of git-changelog-lib. ## 1.85 -### GitHub #70 +### GitHub [#70](https://github.com/tomasbjerre/git-changelog-lib/pull/70) upgrade gitlab dependency **Correcting GitLab integration after** @@ -173,7 +211,7 @@ Changelog of git-changelog-lib. ## 1.84 -### GitHub #68 +### GitHub [#68](https://github.com/tomasbjerre/git-changelog-lib/issues/68) Allow jira link to be constructed without a Jira server integration *enhancement* **Testing issue types** @@ -181,11 +219,11 @@ Changelog of git-changelog-lib. [d812191c55684be](https://github.com/tomasbjerre/git-changelog-lib/commit/d812191c55684be) Tomas Bjerre *2018-10-27 10:32:47* -### No issue +### Other changes **upgrade gitlab dependency** -* Gitlab v3 has been deprecated (see https://about.gitlab.com/2018/06/01/api-v3-removal-impending/) and a new version was released. + * Gitlab v3 has been deprecated (see https://about.gitlab.com/2018/06/01/api-v3-removal-impending/) and a new version was released. [f125a10ae48f178](https://github.com/tomasbjerre/git-changelog-lib/commit/f125a10ae48f178) Jorge *2018-10-27 16:14:52* @@ -196,7 +234,7 @@ Changelog of git-changelog-lib. ## 1.83 -### GitHub #68 +### GitHub [#68](https://github.com/tomasbjerre/git-changelog-lib/issues/68) Allow jira link to be constructed without a Jira server integration *enhancement* **Adding booleans isJira, isGitHub...** @@ -204,7 +242,7 @@ Changelog of git-changelog-lib. [44eff0421308787](https://github.com/tomasbjerre/git-changelog-lib/commit/44eff0421308787) Tomas Bjerre *2018-10-27 05:36:13* -### No issue +### Other changes **Doc - correct typo in authorEmail** @@ -213,7 +251,7 @@ Changelog of git-changelog-lib. ## 1.82 -### No issue +### Other changes **Avoiding NPE:s and some refactoring** @@ -222,7 +260,7 @@ Changelog of git-changelog-lib. ## 1.81 -### No issue +### Other changes **Correcting ownerName when dot in repo name** @@ -236,7 +274,7 @@ Changelog of git-changelog-lib. ## 1.80 -### No issue +### Other changes **Closing connection to Jira** @@ -250,7 +288,7 @@ Changelog of git-changelog-lib. ## 1.79 -### No issue +### Other changes **Bumping version to fix faulty release** @@ -259,7 +297,7 @@ Changelog of git-changelog-lib. **Removing state from GitHub Client** -* The client was created once, with one API, and kept for all future invcations. So that if a changelog was created for one repo (A) and then for a repo (B), then B would use the API from A. Resulting in wrong issue information in B. + * The client was created once, with one API, and kept for all future invcations. So that if a changelog was created for one repo (A) and then for a repo (B), then B would use the API from A. Resulting in wrong issue information in B. [8ef76f5c6653ab3](https://github.com/tomasbjerre/git-changelog-lib/commit/8ef76f5c6653ab3) Tomas Bjerre *2018-01-09 20:46:33* @@ -278,16 +316,16 @@ Changelog of git-changelog-lib. [9f7c782dc9be919](https://github.com/tomasbjerre/git-changelog-lib/commit/9f7c782dc9be919) Tomas Bjerre *2017-12-30 20:07:57* -### No issue +### Jira UTF-8 -**Using UTF-8, instead of default** +**Using , instead of default** [7fe5f6b9860efe7](https://github.com/tomasbjerre/git-changelog-lib/commit/7fe5f6b9860efe7) Tomas Bjerre *2017-12-24 21:59:34* ## 1.76 -### GitHub #59 +### GitHub [#59](https://github.com/tomasbjerre/git-changelog-lib/pull/59) Adding support for Jira Issue Description **Updating Doc after merge of** @@ -295,7 +333,7 @@ Changelog of git-changelog-lib. [cef15b8443eacef](https://github.com/tomasbjerre/git-changelog-lib/commit/cef15b8443eacef) Tomas Bjerre *2017-12-19 10:43:45* -### No issue +### Other changes **README updated** @@ -319,7 +357,7 @@ Changelog of git-changelog-lib. ## 1.75 -### No issue +### Other changes **Using shared build scripts** @@ -333,16 +371,16 @@ Changelog of git-changelog-lib. ## 1.74 -### GitHub #58 +### GitHub [#58](https://github.com/tomasbjerre/git-changelog-lib/issues/58) Avoid using integrations if fetched information is not used in the template *enhancement* **Avoid fetching from integrations if not used** -* Not fetching information from integrations (GitHub, GitLab, Jira) if that information is not used in the template. + * Not fetching information from integrations (GitHub, GitLab, Jira) if that information is not used in the template. [e87efa3246489c2](https://github.com/tomasbjerre/git-changelog-lib/commit/e87efa3246489c2) Tomas Bjerre *2017-11-18 11:26:24* -### No issue +### Other changes **Updating build tools and removing shaddow jar** @@ -351,17 +389,17 @@ Changelog of git-changelog-lib. ## 1.73 -### No issue +### Other changes **Avoiding usage of Guava Objects** -* Because it results in NoSuchMethodException when newer Guava version exists on classpath. Where Objects is replaced with MoreObjects. + * Because it results in NoSuchMethodException when newer Guava version exists on classpath. Where Objects is replaced with MoreObjects. [94dc5eee25f9414](https://github.com/tomasbjerre/git-changelog-lib/commit/94dc5eee25f9414) Tomas Bjerre *2017-11-02 17:06:49* ## 1.72 -### GitHub #51 +### GitHub [#51](https://github.com/tomasbjerre/git-changelog-lib/issues/51) Error while trying to create the changelog file. **Rewrite MediaWiki Client for Botuser** @@ -369,7 +407,7 @@ Changelog of git-changelog-lib. [9cd8d1dfa42aea1](https://github.com/tomasbjerre/git-changelog-lib/commit/9cd8d1dfa42aea1) Tomas Bjerre *2017-08-31 17:23:58* -### No issue +### Other changes **Disabling MediaWiki integration tests** @@ -383,7 +421,7 @@ Changelog of git-changelog-lib. ## 1.71 -### No issue +### Other changes **Correcting owner/repo name cloneUrl without dot git** @@ -392,17 +430,17 @@ Changelog of git-changelog-lib. ## 1.70 -### GitHub #49 +### GitHub [#49](https://github.com/tomasbjerre/git-changelog-lib/issues/49) Ability to grab the url from the git config. *enhancement* **Gathering repo provider information** -* Getting ownerName and repoName from clone URL. -* Setting GitLab server and GitHub API from clone URL. + * Getting ownerName and repoName from clone URL. + * Setting GitLab server and GitHub API from clone URL. [dd8497034624b12](https://github.com/tomasbjerre/git-changelog-lib/commit/dd8497034624b12) Tomas Bjerre *2017-07-23 19:10:43* -### No issue +### Other changes **Cleaning** @@ -411,18 +449,18 @@ Changelog of git-changelog-lib. ## 1.69 -### GitHub #47 +### GitHub [#47](https://github.com/tomasbjerre/git-changelog-lib/pull/47) Add ignoreCommitsOlderThan date limiting *enhancement* **Adjustments after merge of** -* Using the Date data type instead of String to supply ignoreCommitsOlderThan. -* Making ignoreCommits more effective. -* Also cleaning up unrelated parts of the API. Use File instead of String to supply changelog file. Enabling write changelog to Writer. + * Using the Date data type instead of String to supply ignoreCommitsOlderThan. + * Making ignoreCommits more effective. + * Also cleaning up unrelated parts of the API. Use File instead of String to supply changelog file. Enabling write changelog to Writer. [121e65493ec764b](https://github.com/tomasbjerre/git-changelog-lib/commit/121e65493ec764b) Tomas Bjerre *2017-07-07 20:04:00* -### No issue +### Other changes **Fix CommitsWithMesssage typo -> CommitsWithMessage** @@ -431,11 +469,11 @@ Changelog of git-changelog-lib. **Add ignoreCommitsOlderThan date limiting** -* The rationale is that perhaps projects might: -* use a git-based changelog to inform coworkers, rather than -* customers, making a more short-lived "news"-style log desirable, -* not (yet?) use frequent-enough tags in their repository, -* want to provide a sense for the liveliness of a project + * The rationale is that perhaps projects might: + * use a git-based changelog to inform coworkers, rather than + * customers, making a more short-lived "news"-style log desirable, + * not (yet?) use frequent-enough tags in their repository, + * want to provide a sense for the liveliness of a project [671816d3dc3d60a](https://github.com/tomasbjerre/git-changelog-lib/commit/671816d3dc3d60a) jakob *2017-07-03 23:53:47* @@ -446,7 +484,7 @@ Changelog of git-changelog-lib. ## 1.68 -### No issue +### Other changes **doc** @@ -460,17 +498,17 @@ Changelog of git-changelog-lib. ## 1.67 -### GitHub #2 +### GitHub [#2](https://github.com/tomasbjerre/git-changelog-lib/issues/2) GitHub Integration *enhancement* **GitLab integration** -* Adding it to the API. + * Adding it to the API. [743ab5566d39083](https://github.com/tomasbjerre/git-changelog-lib/commit/743ab5566d39083) Tomas Bjerre *2017-03-25 16:31:51* ## 1.66 -### GitHub #42 +### GitHub [#42](https://github.com/tomasbjerre/git-changelog-lib/issues/42) GitLab integration *enhancement* **GitLab integration** @@ -479,7 +517,7 @@ Changelog of git-changelog-lib. ## 1.65 -### No issue +### Other changes **doc** @@ -493,7 +531,7 @@ Changelog of git-changelog-lib. ## 1.64 -### GitHub #40 +### GitHub [#40](https://github.com/tomasbjerre/git-changelog-lib/pull/40) add jira issue type *enhancement* **Adding issueType and labels attributes** @@ -501,7 +539,7 @@ Changelog of git-changelog-lib. [6db44d44152f5da](https://github.com/tomasbjerre/git-changelog-lib/commit/6db44d44152f5da) Tomas Bjerre *2017-03-18 09:10:13* -### No issue +### Other changes **Google java code standard** @@ -515,7 +553,7 @@ Changelog of git-changelog-lib. ## 1.63 -### No issue +### Other changes **Adding timeout, 10 seconds** @@ -534,13 +572,13 @@ Changelog of git-changelog-lib. **Adding HTML example supplied by Joel Eriksson** -* Also moving example templates to examples folder. + * Also moving example templates to examples folder. [4c554557c16f68d](https://github.com/tomasbjerre/git-changelog-lib/commit/4c554557c16f68d) Tomas Bjerre *2016-12-21 16:29:21* ## 1.62 -### No issue +### Other changes **mergeServiceFiles in fat jar** @@ -549,7 +587,7 @@ Changelog of git-changelog-lib. ## 1.61 -### GitHub #38 +### GitHub [#38](https://github.com/tomasbjerre/git-changelog-lib/issues/38) Relocate packages to avoid classpath issues *enhancement* **Relocate packages to avoid classpath issues** @@ -558,7 +596,7 @@ Changelog of git-changelog-lib. ## 1.60 -### GitHub #38 +### GitHub [#38](https://github.com/tomasbjerre/git-changelog-lib/issues/38) Relocate packages to avoid classpath issues *enhancement* **Relocate packages to avoid classpath issues** @@ -567,7 +605,7 @@ Changelog of git-changelog-lib. ## 1.59 -### GitHub #38 +### GitHub [#38](https://github.com/tomasbjerre/git-changelog-lib/issues/38) Relocate packages to avoid classpath issues *enhancement* **Relocate packages to avoid classpath issues** @@ -576,7 +614,7 @@ Changelog of git-changelog-lib. ## 1.58 -### GitHub #36 +### GitHub [#36](https://github.com/tomasbjerre/git-changelog-lib/issues/36) Annotated tags support *enhancement* **Adding annotation to context of tag** @@ -585,7 +623,7 @@ Changelog of git-changelog-lib. ## 1.57 -### GitHub #35 +### GitHub [#35](https://github.com/tomasbjerre/git-changelog-lib/issues/35) Git Change log show only Merges or have Merge as its own Tag **Adding merge boolean to commits** @@ -594,7 +632,7 @@ Changelog of git-changelog-lib. ## 1.56 -### GitHub #31 +### GitHub [#31](https://github.com/tomasbjerre/git-changelog-lib/pull/31) issue key was missing in issue link **Fixing testcases after merge of** @@ -602,7 +640,7 @@ Changelog of git-changelog-lib. [50dcd850d6bec5d](https://github.com/tomasbjerre/git-changelog-lib/commit/50dcd850d6bec5d) Tomas Bjerre *2016-08-11 14:14:57* -### No issue +### Other changes **issue key was missing in issue link** @@ -611,7 +649,7 @@ Changelog of git-changelog-lib. ## 1.55 -### GitHub #30 +### GitHub [#30](https://github.com/tomasbjerre/git-changelog-lib/issues/30) Getting full hash from Commit object *enhancement* **Adding {{hashFull}} variable with full commit hash** @@ -620,7 +658,7 @@ Changelog of git-changelog-lib. ## 1.54 -### GitHub #28 +### GitHub [#28](https://github.com/tomasbjerre/git-changelog-lib/issues/28) Crash when git repo has no master branch *bug* **Allowing master branch to be absent** @@ -628,7 +666,7 @@ Changelog of git-changelog-lib. [dd4633ba627695d](https://github.com/tomasbjerre/git-changelog-lib/commit/dd4633ba627695d) Tomas Bjerre *2016-06-27 17:26:30* -### No issue +### Other changes **More testing** @@ -637,7 +675,7 @@ Changelog of git-changelog-lib. ## 1.53 -### No issue +### Other changes **Faster** @@ -646,7 +684,7 @@ Changelog of git-changelog-lib. ## 1.52 -### GitHub #29 +### GitHub [#29](https://github.com/tomasbjerre/git-changelog-lib/issues/29) Not, always, including merged in commits *bug* **Correcting how to find diffing commits #** @@ -659,7 +697,7 @@ Changelog of git-changelog-lib. [717602bef6a4ab1](https://github.com/tomasbjerre/git-changelog-lib/commit/717602bef6a4ab1) Tomas Bjerre *2016-06-24 15:45:29* -### No issue +### Other changes **Reverting a723e0a** @@ -668,7 +706,7 @@ Changelog of git-changelog-lib. ## 1.51 -### No issue +### Other changes **Show found refs when not finding ref** @@ -682,7 +720,7 @@ Changelog of git-changelog-lib. ## 1.50 -### GitHub #29 +### GitHub [#29](https://github.com/tomasbjerre/git-changelog-lib/issues/29) Not, always, including merged in commits *bug* **Including commits frmo merges** @@ -691,16 +729,16 @@ Changelog of git-changelog-lib. ## 1.49 -### GitHub #28 +### GitHub [#28](https://github.com/tomasbjerre/git-changelog-lib/issues/28) Crash when git repo has no master branch *bug* **Finding first commit in repo as parents of HEAD** -* Was looking at parents of master, which may not exist. + * Was looking at parents of master, which may not exist. [87fe4044e587b1b](https://github.com/tomasbjerre/git-changelog-lib/commit/87fe4044e587b1b) Tomas Bjerre *2016-06-02 17:55:59* -### No issue +### Other changes **Adjusting example html template** @@ -709,7 +747,7 @@ Changelog of git-changelog-lib. ## 1.48 -### No issue +### Other changes **Testing trailing slash in Jira** @@ -718,17 +756,17 @@ Changelog of git-changelog-lib. ## 1.47 -### No issue +### Other changes **Removing trailing slash from Jira API URL** -* If it is specified. + * If it is specified. [a94d576b6fd706e](https://github.com/tomasbjerre/git-changelog-lib/commit/a94d576b6fd706e) Tomas Bjerre *2016-04-28 16:18:20* ## 1.46 -### No issue +### Other changes **Making API model serializable** @@ -737,12 +775,12 @@ Changelog of git-changelog-lib. ## 1.45 -### GitHub #26 +### GitHub [#26](https://github.com/tomasbjerre/git-changelog-lib/issues/26) Excluded commits are included JENKINS-34156 *bug* **Including correct commits + performance** -* Found major performance problem when sorting tags by commit time, fixed. -* Now not following parents, unless *from* is merged into them. + * Found major performance problem when sorting tags by commit time, fixed. + * Now not following parents, unless *from* is merged into them. [e3106df640b693b](https://github.com/tomasbjerre/git-changelog-lib/commit/e3106df640b693b) Tomas Bjerre *2016-04-13 18:30:26* @@ -751,8 +789,8 @@ Changelog of git-changelog-lib. **Including correct commits + performance** -* Found major performance problem when sorting tags by commit time, fixed. -* Now not following parents, unless *from* is merged into them. + * Found major performance problem when sorting tags by commit time, fixed. + * Now not following parents, unless *from* is merged into them. [e3106df640b693b](https://github.com/tomasbjerre/git-changelog-lib/commit/e3106df640b693b) Tomas Bjerre *2016-04-13 18:30:26* @@ -767,7 +805,7 @@ Changelog of git-changelog-lib. ## 1.43 -### No issue +### Other changes **Parsing commits, oldest first** @@ -776,36 +814,36 @@ Changelog of git-changelog-lib. ## 1.42 -### GitHub #23 +### GitHub [#23](https://github.com/tomasbjerre/git-changelog-lib/issues/23) changelog is generating incorrect order of commits/Issues *bug* **Parsing commits, oldest first** -* To avoid random behaviour. + * To avoid random behaviour. [9817cdf6a1fbe91](https://github.com/tomasbjerre/git-changelog-lib/commit/9817cdf6a1fbe91) Tomas Bjerre *2016-04-10 08:49:45* ## 1.41 -### GitHub #23 +### GitHub [#23](https://github.com/tomasbjerre/git-changelog-lib/issues/23) changelog is generating incorrect order of commits/Issues *bug* **Traversing commit tree by parents** -* To find all commits in all tags. + * To find all commits in all tags. [9dcba5d33fc2e44](https://github.com/tomasbjerre/git-changelog-lib/commit/9dcba5d33fc2e44) Tomas Bjerre *2016-04-09 20:21:58* ## 1.40 -### GitHub #23 +### GitHub [#23](https://github.com/tomasbjerre/git-changelog-lib/issues/23) changelog is generating incorrect order of commits/Issues *bug* **Adding feature to ignore tags by regexp** -* Also testing tag in feature branch + * Also testing tag in feature branch [8166ec7dfd456df](https://github.com/tomasbjerre/git-changelog-lib/commit/8166ec7dfd456df) Tomas Bjerre *2016-04-06 20:39:27* -### No issue +### Other changes **Updating CHANGELOG.md** @@ -814,17 +852,17 @@ Changelog of git-changelog-lib. ## 1.39 -### No issue +### Other changes **Sorting filtered commits, was random from hash** -* Building with OpenJDK7 in Travis + * Building with OpenJDK7 in Travis [b976129fb928dc1](https://github.com/tomasbjerre/git-changelog-lib/commit/b976129fb928dc1) Tomas Bjerre *2016-03-20 09:42:23* ## 1.38 -### GitHub #19 +### GitHub [#19](https://github.com/tomasbjerre/git-changelog-lib/issues/19) Feature-request (or question): Issues by category *enhancement* **Removing commits without issue, from tags** @@ -833,7 +871,7 @@ Changelog of git-changelog-lib. ## 1.37 -### GitHub #19 +### GitHub [#19](https://github.com/tomasbjerre/git-changelog-lib/issues/19) Feature-request (or question): Issues by category *enhancement* **Ignore commits without issue** @@ -846,7 +884,7 @@ Changelog of git-changelog-lib. [a025adfc759313f](https://github.com/tomasbjerre/git-changelog-lib/commit/a025adfc759313f) Tomas Bjerre *2016-03-19 20:33:11* -### GitHub #21 +### GitHub [#21](https://github.com/tomasbjerre/git-changelog-lib/issues/21) Commits can be listed multiple times *bug* **Avoiding adding commit twice in same issue** @@ -854,7 +892,7 @@ Changelog of git-changelog-lib. [414348773e3d658](https://github.com/tomasbjerre/git-changelog-lib/commit/414348773e3d658) Tomas Bjerre *2016-03-19 22:16:40* -### No issue +### Other changes **Avoiding parsing commits twice** @@ -868,32 +906,32 @@ Changelog of git-changelog-lib. ## 1.36 -### No issue +### Other changes **Fixing infinite loop in GitRepo** -* Found in 1.19 -* at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208) -* at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174) -* at se.bjurr.gitchangelog.internal.git.GitRepo.firstCommit(GitRepo.java:195) -* at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208) -* at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174) + * Found in 1.19 + * at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208) + * at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174) + * at se.bjurr.gitchangelog.internal.git.GitRepo.firstCommit(GitRepo.java:195) + * at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208) + * at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174) [a4a15094f367c31](https://github.com/tomasbjerre/git-changelog-lib/commit/a4a15094f367c31) Tomas Bjerre *2016-03-15 20:27:41* ## 1.35 -### No issue +### Other changes **Using okhttp 2.7.5 was using 2.3.0** -* Which caused ClassNotFoundException for okio/ForwardingTimeout. + * Which caused ClassNotFoundException for okio/ForwardingTimeout. [a4bb6103886b293](https://github.com/tomasbjerre/git-changelog-lib/commit/a4bb6103886b293) Tomas Bjerre *2016-03-15 20:12:47* ## 1.34 -### GitHub #18 +### GitHub [#18](https://github.com/tomasbjerre/git-changelog-lib/pull/18) Migrate GitHub to RetroFit , add pagination and token support **Logging error if error invoking GitHub API** @@ -901,7 +939,7 @@ Changelog of git-changelog-lib. [a040e51847b4f23](https://github.com/tomasbjerre/git-changelog-lib/commit/a040e51847b4f23) Tomas Bjerre *2016-03-15 19:05:58* -### No issue +### Other changes **Updating CHANGELOG.md** @@ -910,36 +948,36 @@ Changelog of git-changelog-lib. ## 1.33 -### GitHub #10 +### GitHub [#10](https://github.com/tomasbjerre/git-changelog-lib/issues/10) Authentication with GitHub *enhancement* **Migrate GitHub REST-API to RetroFit library** -* Added auth-token support for GitHub, fixes -* Added pagination support for GitHub, fixes + * Added auth-token support for GitHub, fixes + * Added pagination support for GitHub, fixes [d29029a38fad6a4](https://github.com/tomasbjerre/git-changelog-lib/commit/d29029a38fad6a4) Jonas Kalderstam *2016-03-15 00:12:45* -### GitHub #15 +### GitHub [#15](https://github.com/tomasbjerre/git-changelog-lib/issues/15) Github, support pagination *enhancement* **Migrate GitHub REST-API to RetroFit library** -* Added auth-token support for GitHub, fixes -* Added pagination support for GitHub, fixes + * Added auth-token support for GitHub, fixes + * Added pagination support for GitHub, fixes [d29029a38fad6a4](https://github.com/tomasbjerre/git-changelog-lib/commit/d29029a38fad6a4) Jonas Kalderstam *2016-03-15 00:12:45* -### GitHub #18 +### GitHub [#18](https://github.com/tomasbjerre/git-changelog-lib/pull/18) Migrate GitHub to RetroFit , add pagination and token support **Introducing custom exceptions** -* Also fixing some issues from PR . Removing duplicate Gson, System.out, throwing exceptions. + * Also fixing some issues from PR . Removing duplicate Gson, System.out, throwing exceptions. [4cb3f757f8a6b9f](https://github.com/tomasbjerre/git-changelog-lib/commit/4cb3f757f8a6b9f) Tomas Bjerre *2016-03-15 17:22:33* -### No issue +### Other changes **Update README.md** @@ -948,7 +986,7 @@ Changelog of git-changelog-lib. ## 1.32 -### GitHub #16 +### GitHub [#16](https://github.com/tomasbjerre/git-changelog-lib/issues/16) Commit not available in all issues mentioned in commit comment *bug* **Supplying commit in each issue mentioned in message** @@ -956,7 +994,7 @@ Changelog of git-changelog-lib. [102431686668a6c](https://github.com/tomasbjerre/git-changelog-lib/commit/102431686668a6c) Tomas Bjerre *2016-02-19 22:18:39* -### No issue +### Other changes **Avoiding unnecessary Optional in JiraClient** @@ -965,7 +1003,7 @@ Changelog of git-changelog-lib. ## 1.31 -### No issue +### Other changes **Enabling custom Jira client** @@ -974,18 +1012,18 @@ Changelog of git-changelog-lib. ## 1.30 -### No issue +### Other changes **Bugfix, handling multiple tags on same commit** -* Using the last one found. -* Also refactoring tests. Added a special test-branch to use real GIT instead of fake repo. + * Using the last one found. + * Also refactoring tests. Added a special test-branch to use real GIT instead of fake repo. [3c794133dcc1d00](https://github.com/tomasbjerre/git-changelog-lib/commit/3c794133dcc1d00) Tomas Bjerre *2016-02-15 17:41:45* ## 1.29 -### No issue +### Other changes **Bugfix, crashed if all commits in tag were ignored** @@ -994,7 +1032,7 @@ Changelog of git-changelog-lib. ## 1.28 -### No issue +### Other changes **Optimizations, reducing memory usage** @@ -1008,7 +1046,7 @@ Changelog of git-changelog-lib. ## 1.27 -### No issue +### Other changes **Bugfix, was not including first tag** @@ -1017,7 +1055,7 @@ Changelog of git-changelog-lib. ## 1.26 -### GitHub #13 +### GitHub [#13](https://github.com/tomasbjerre/git-changelog-lib/issues/13) Performance *enhancement* **Rewriting GitRepo to make it faster** @@ -1026,24 +1064,24 @@ Changelog of git-changelog-lib. **Identified performance issue as GitRepo:getTags()** -* Updating performance test to reveal it. + * Updating performance test to reveal it. [be9fb93023f13ad](https://github.com/tomasbjerre/git-changelog-lib/commit/be9fb93023f13ad) Tomas Bjerre *2016-02-11 17:48:06* ## 1.25 -### GitHub #13 +### GitHub [#13](https://github.com/tomasbjerre/git-changelog-lib/issues/13) Performance *enhancement* **Letting JGit determine new commits between refs** -* Also changing changelog template. -* Also trimming messageTitle variable. + * Also changing changelog template. + * Also trimming messageTitle variable. [5b307bd00b47e83](https://github.com/tomasbjerre/git-changelog-lib/commit/5b307bd00b47e83) Tomas Bjerre *2016-02-10 17:31:13* ## 1.24 -### No issue +### Other changes **Added variables: messageTitle, messageBody, messageItems** @@ -1062,7 +1100,7 @@ Changelog of git-changelog-lib. ## 1.23 -### No issue +### Other changes **Sorting tags by committime, not committime formatted string** @@ -1081,7 +1119,7 @@ Changelog of git-changelog-lib. ## 1.22 -### No issue +### Other changes **Removing accidently added duplicate Gson dependency** @@ -1090,21 +1128,21 @@ Changelog of git-changelog-lib. ## 1.21 -### No issue +### Other changes **Correcting revision logging** -* Resetting Jira and GitHub clients before tests. Was having troubles with the cache not being invalidated between tests. + * Resetting Jira and GitHub clients before tests. Was having troubles with the cache not being invalidated between tests. [00b37d11101f8d1](https://github.com/tomasbjerre/git-changelog-lib/commit/00b37d11101f8d1) Tomas Bjerre *2016-01-30 16:39:21* ## 1.20 -### No issue +### Other changes **Including first commit** -* Was excluding it when ZERO_COMMIT constant was used + * Was excluding it when ZERO_COMMIT constant was used [c3da07c0286855d](https://github.com/tomasbjerre/git-changelog-lib/commit/c3da07c0286855d) Tomas Bjerre *2016-01-30 11:56:15* @@ -1120,13 +1158,13 @@ Changelog of git-changelog-lib. **Updating CHANGELOG.md** -* And Removing generate_changelog.sh + * And Removing generate_changelog.sh [7613efc4a5a0833](https://github.com/tomasbjerre/git-changelog-lib/commit/7613efc4a5a0833) Tomas Bjerre *2016-01-27 18:51:11* ## 1.19 -### GitHub #11 +### GitHub [#11](https://github.com/tomasbjerre/git-changelog-lib/issues/11) Move command line to its own repo *enhancement* **Removing command line code** @@ -1134,7 +1172,7 @@ Changelog of git-changelog-lib. [a7b20fdea564ff2](https://github.com/tomasbjerre/git-changelog-lib/commit/a7b20fdea564ff2) Tomas Bjerre *2016-01-27 18:14:33* -### No issue +### Other changes **Changing Jenkins plugin link to point at JenkinsCI** @@ -1148,7 +1186,7 @@ Changelog of git-changelog-lib. ## 1.18 -### No issue +### Other changes **Downgrading JGIT to 3.6.2 to be compatible with its older API** @@ -1157,7 +1195,7 @@ Changelog of git-changelog-lib. ## 1.17 -### No issue +### Other changes **Allowing variables to be extended with custom context:s** @@ -1166,27 +1204,27 @@ Changelog of git-changelog-lib. ## 1.16 -### No issue +### Other changes **Peeling references** -* To support annotated tags + * To support annotated tags [b818fd6a2f1207c](https://github.com/tomasbjerre/git-changelog-lib/commit/b818fd6a2f1207c) Tomas Bjerre *2015-12-05 14:01:56* ## 1.15 -### No issue +### Other changes **Using JGit to find repo folder correctly** -* And JsonPath 2.1.0 + * And JsonPath 2.1.0 [2d0c1f1102387d0](https://github.com/tomasbjerre/git-changelog-lib/commit/2d0c1f1102387d0) Tomas Bjerre *2015-12-04 22:09:16* ## 1.14 -### No issue +### Other changes **Caching requests to GitHub and Jira** @@ -1195,7 +1233,7 @@ Changelog of git-changelog-lib. ## 1.13 -### No issue +### Other changes **Avoiding crash if GitHub issue cant be found** @@ -1204,7 +1242,7 @@ Changelog of git-changelog-lib. ## 1.12 -### GitHub #2 +### GitHub [#2](https://github.com/tomasbjerre/git-changelog-lib/issues/2) GitHub Integration *enhancement* **Integrating with GitHub** @@ -1212,7 +1250,7 @@ Changelog of git-changelog-lib. [45af766856ac703](https://github.com/tomasbjerre/git-changelog-lib/commit/45af766856ac703) Tomas Bjerre *2015-11-22 19:51:40* -### GitHub #3 +### GitHub [#3](https://github.com/tomasbjerre/git-changelog-lib/issues/3) Jira Integration *enhancement* **Integrating with Jira** @@ -1221,11 +1259,11 @@ Changelog of git-changelog-lib. ## 1.11 -### No issue +### Other changes **Changing master reference constan, to just master** -* refs/heads/master may not exist, perhaps its refs/remotes/origin/master + * refs/heads/master may not exist, perhaps its refs/remotes/origin/master [c655cbd914d06f3](https://github.com/tomasbjerre/git-changelog-lib/commit/c655cbd914d06f3) Tomas Bjerre *2015-11-21 15:36:03* @@ -1236,12 +1274,12 @@ Changelog of git-changelog-lib. ## 1.10 -### No issue +### Other changes **Adding test cases for MediaWiki integration** -* Linking readme to screenshots -* Not encoding html-tags for MediaWiki, to enable setting the toclimit with a tag. + * Linking readme to screenshots + * Not encoding html-tags for MediaWiki, to enable setting the toclimit with a tag. [c8da374a92183d2](https://github.com/tomasbjerre/git-changelog-lib/commit/c8da374a92183d2) Tomas Bjerre *2015-11-21 14:18:19* @@ -1252,13 +1290,16 @@ Changelog of git-changelog-lib. ## 1.9 -### No issue +### Bugs #bug Mixed bugs -**Adding custom issues correctly #bugfix** +**Adding custom issues correctly fix** [b5f03710018a65d](https://github.com/tomasbjerre/git-changelog-lib/commit/b5f03710018a65d) Tomas Bjerre *2015-11-20 21:12:55* + +### Other changes + **Better regular expression for extracting readable part of tag name #feature** @@ -1266,25 +1307,25 @@ Changelog of git-changelog-lib. ## 1.8 -### No issue +### Bugs #bug Mixed bugs -**Setting default setting of ignore commits regexp #bugfix** +**Setting default setting of ignore commits regexp fix** [c226865b64ce01c](https://github.com/tomasbjerre/git-changelog-lib/commit/c226865b64ce01c) Tomas Bjerre *2015-11-20 20:24:08* ## 1.7 -### No issue +### Bugs #bug Mixed bugs -**Using correct reference #bugfix** +**Using correct reference fix** [388a3a851f665c1](https://github.com/tomasbjerre/git-changelog-lib/commit/388a3a851f665c1) Tomas Bjerre *2015-11-20 19:08:45* ## 1.6 -### No issue +### Other changes **Some more work to get the lib working with Jenkins plugin** @@ -1298,7 +1339,7 @@ Changelog of git-changelog-lib. ## 1.5 -### No issue +### Other changes **Not loading default settings by default when using API** @@ -1312,7 +1353,7 @@ Changelog of git-changelog-lib. ## 1.4 -### GitHub #7 +### GitHub [#7](https://github.com/tomasbjerre/git-changelog-lib/issues/7) Add booleans to enable if statements *enhancement* **Adding hasIssue hasLink to readme doc** @@ -1320,7 +1361,7 @@ Changelog of git-changelog-lib. [fbb455921921ddc](https://github.com/tomasbjerre/git-changelog-lib/commit/fbb455921921ddc) Tomas Bjerre *2015-11-18 19:41:03* -### No issue +### Other changes **Making sure several custom issue patterns can be set with API** @@ -1334,7 +1375,7 @@ Changelog of git-changelog-lib. ## 1.3 -### GitHub #7 +### GitHub [#7](https://github.com/tomasbjerre/git-changelog-lib/issues/7) Add booleans to enable if statements *enhancement* **Adding booleans to check if link and/or issue exists in issue** @@ -1342,7 +1383,7 @@ Changelog of git-changelog-lib. [210e963a07b8a7b](https://github.com/tomasbjerre/git-changelog-lib/commit/210e963a07b8a7b) Tomas Bjerre *2015-11-18 19:06:00* -### No issue +### Other changes **Adding new mediawiki screenshot** @@ -1361,7 +1402,7 @@ Changelog of git-changelog-lib. ## 1.2 -### GitHub #4 +### GitHub [#4](https://github.com/tomasbjerre/git-changelog-lib/issues/4) Mediawiki integration *enhancement* **MediaWiki integration** @@ -1369,7 +1410,7 @@ Changelog of git-changelog-lib. [f45829b2c6a78d7](https://github.com/tomasbjerre/git-changelog-lib/commit/f45829b2c6a78d7) Tomas Bjerre *2015-11-17 19:27:03* -### No issue +### Other changes **doc** @@ -1388,7 +1429,7 @@ Changelog of git-changelog-lib. **Changing regexp pattern for github** -* So that it does not match feature issues #feature + * So that it does not match feature issues #feature [dd31f0a16fedfcf](https://github.com/tomasbjerre/git-changelog-lib/commit/dd31f0a16fedfcf) Tomas Bjerre *2015-11-15 12:47:06* @@ -1404,44 +1445,47 @@ Changelog of git-changelog-lib. ## 1.1 -### No issue +### Bugs #bug Mixed bugs -**Car remove issue from commit message in changelog #feature** +**Adding generated CHANGELOG.md #feature** + * Correcting faulty precondition check, file output argument could not be set. -[ec026ad2f25c612](https://github.com/tomasbjerre/git-changelog-lib/commit/ec026ad2f25c612) Tomas Bjerre *2015-11-15 11:37:18* +[b3ddd5fdad30f41](https://github.com/tomasbjerre/git-changelog-lib/commit/b3ddd5fdad30f41) Tomas Bjerre *2015-11-15 09:48:35* -**Improving test output #feature** +**Adding script to generate changelog** + * Finding git repo in parent folders correctly fix -[3191a431aff2b20](https://github.com/tomasbjerre/git-changelog-lib/commit/3191a431aff2b20) Tomas Bjerre *2015-11-15 10:58:51* +[82be7c398d445bd](https://github.com/tomasbjerre/git-changelog-lib/commit/82be7c398d445bd) Tomas Bjerre *2015-11-15 09:15:38* -**Adding generated CHANGELOG.md #feature** -* Correcting faulty precondition check, file output argument could not be set. #bug +### Other changes -[b3ddd5fdad30f41](https://github.com/tomasbjerre/git-changelog-lib/commit/b3ddd5fdad30f41) Tomas Bjerre *2015-11-15 09:48:35* +**Car remove issue from commit message in changelog #feature** -**Customizing changelog #feature** +[ec026ad2f25c612](https://github.com/tomasbjerre/git-changelog-lib/commit/ec026ad2f25c612) Tomas Bjerre *2015-11-15 11:37:18* -[59830c6f2a394fe](https://github.com/tomasbjerre/git-changelog-lib/commit/59830c6f2a394fe) Tomas Bjerre *2015-11-15 09:24:58* +**Improving test output #feature** -**Adding script to generate changelog** -* Finding git repo in parent folders correctly #bugfix +[3191a431aff2b20](https://github.com/tomasbjerre/git-changelog-lib/commit/3191a431aff2b20) Tomas Bjerre *2015-11-15 10:58:51* -[82be7c398d445bd](https://github.com/tomasbjerre/git-changelog-lib/commit/82be7c398d445bd) Tomas Bjerre *2015-11-15 09:15:38* +**Customizing changelog #feature** + + +[59830c6f2a394fe](https://github.com/tomasbjerre/git-changelog-lib/commit/59830c6f2a394fe) Tomas Bjerre *2015-11-15 09:24:58* **More settings can be set from command line** -* More testing + * More testing [ba9d565ddd15d1b](https://github.com/tomasbjerre/git-changelog-lib/commit/ba9d565ddd15d1b) Tomas Bjerre *2015-11-15 08:58:00* ## 1.0 -### No issue +### Other changes **Doc** diff --git a/README.md b/README.md index 613404d2..f30954d7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a library for generating a changelog, or releasenotes, from a GIT repository. It can also be run as a standalone program, Gradle plugin, Maven plugin or Jenkins plugin. -It is fully configurable with a [Mustache](http://mustache.github.io/) template. That can: +It is fully configurable with a [Mustache (Handlebars)](https://github.com/jknack/handlebars.java) template. That can: * Be stored to file, like `CHANGELOG.md`. There are some templates used for testing available [here](/src/test/resources/templatetest). * Or just rendered to a `String`. diff --git a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApi.java b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApi.java index fb63d849..b436dc95 100644 --- a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApi.java +++ b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApi.java @@ -4,6 +4,7 @@ import static com.google.common.base.Optional.of; import static com.google.common.io.Files.createParentDirs; import static com.google.common.io.Files.write; +import static java.nio.charset.StandardCharsets.UTF_8; import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.REF_MASTER; import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.ZERO_COMMIT; import static se.bjurr.gitchangelog.internal.git.GitRepoDataHelper.removeCommitsWithoutIssue; @@ -29,6 +30,8 @@ import java.util.Date; import java.util.List; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; import org.eclipse.jgit.lib.ObjectId; import se.bjurr.gitchangelog.api.exceptions.GitChangelogRepositoryException; import se.bjurr.gitchangelog.api.model.Changelog; @@ -42,6 +45,8 @@ import se.bjurr.gitchangelog.internal.model.Transformer; import se.bjurr.gitchangelog.internal.settings.Settings; import se.bjurr.gitchangelog.internal.settings.SettingsIssue; +import se.bjurr.gitchangelog.semantic.SemanticVersion; +import se.bjurr.gitchangelog.semantic.SemanticVersioning; public class GitChangelogApi { @@ -51,9 +56,13 @@ public static GitChangelogApi gitChangelogApiBuilder() { private Settings settings; private String templateContent; + private Handlebars handlebars; + private final AtomicInteger helperCounter = new AtomicInteger(); private GitChangelogApi() { this.settings = new Settings(); + this.handlebars = new Handlebars(); + this.handlebars.setPrettyPrint(true); } private GitChangelogApi(final Settings settings) { @@ -69,10 +78,10 @@ public Changelog getChangelog() throws GitChangelogRepositoryException { return this.getChangelog(true); } - private Changelog getChangelog(boolean shouldUseIntegrationIfConfigured) + private Changelog getChangelog(final boolean shouldUseIntegrationIfConfigured) throws GitChangelogRepositoryException { try (GitRepo gitRepo = new GitRepo(new File(this.settings.getFromRepo()))) { - return getChangelog(gitRepo, shouldUseIntegrationIfConfigured); + return this.getChangelog(gitRepo, shouldUseIntegrationIfConfigured); } catch (final IOException e) { throw new GitChangelogRepositoryException("", e); } @@ -88,24 +97,22 @@ public Settings getSettings() { * @throws GitChangelogRepositoryException */ public void render(final Writer writer) throws GitChangelogRepositoryException { - Handlebars handlebars = new Handlebars(); - handlebars.setPrettyPrint(true); Template template = null; - String templateString = getTemplateString(); + final String templateString = this.getTemplateString(); try { - template = handlebars.compileInline(templateString); - } catch (IOException e) { + template = this.handlebars.compileInline(templateString); + } catch (final IOException e) { throw new RuntimeException("Cannot render:\n\n" + templateString, e); } try { final Changelog changelog = this.getChangelog(shouldUseIntegrationIfConfigured(templateString)); - Map extendedVariables = this.settings.getExtendedVariables(); + final Map extendedVariables = this.settings.getExtendedVariables(); if (extendedVariables == null) { throw new IllegalStateException("extendedVariables cannot be null"); } - Context changelogContext = Context.newContext(changelog).combine(extendedVariables); + final Context changelogContext = Context.newContext(changelog).combine(extendedVariables); template.apply(changelogContext, writer); } catch (final IOException e) { // Should be impossible! @@ -115,27 +122,27 @@ public void render(final Writer writer) throws GitChangelogRepositoryException { public String getTemplateString() { if (this.templateContent != null) { - return templateContent; + return this.templateContent; } String templateString; try { byte[] templateBytes = null; - Path templatePath = Paths.get(this.settings.getTemplatePath()); + final Path templatePath = Paths.get(this.settings.getTemplatePath()); if (templatePath.toFile().exists()) { templateBytes = Files.readAllBytes(templatePath); } else { - URL templateUrl = GitChangelogApi.class.getResource(settings.getTemplatePath()); + URL templateUrl = GitChangelogApi.class.getResource(this.settings.getTemplatePath()); if (templateUrl == null) { - templateUrl = GitChangelogApi.class.getResource("/" + settings.getTemplatePath()); + templateUrl = GitChangelogApi.class.getResource("/" + this.settings.getTemplatePath()); if (templateUrl == null) { throw new FileNotFoundException( - "Was unable to find file, or resouce, \"" + settings.getTemplatePath() + "\""); + "Was unable to find file, or resouce, \"" + this.settings.getTemplatePath() + "\""); } } templateBytes = Resources.toByteArray(templateUrl); } templateString = new String(templateBytes, StandardCharsets.UTF_8); - } catch (IOException e) { + } catch (final IOException e) { throw new RuntimeException(this.settings.getTemplatePath(), e); } return templateString; @@ -152,7 +159,7 @@ static boolean shouldUseIntegrationIfConfigured(final String templateContent) { /** Get the changelog. */ public String render() throws GitChangelogRepositoryException { final Writer writer = new StringWriter(); - render(writer); + this.render(writer); return writer.toString(); } @@ -164,7 +171,81 @@ public String render() throws GitChangelogRepositoryException { */ public void toFile(final File file) throws GitChangelogRepositoryException, IOException { createParentDirs(file); - write(render().getBytes("UTF-8"), file); + write(this.render().getBytes(UTF_8), file); + } + + /** Prepend the changelog to the given file. */ + public void prependToFile(final File file) throws GitChangelogRepositoryException, IOException { + if (!file.exists()) { + this.toFile(file); + return; + } + final String prepend = this.render(); + final String changelogContent = new String(Files.readAllBytes(file.toPath())); + write((prepend + "\n" + changelogContent).getBytes(UTF_8), file); + } + + /** + * Get next semantic version. This requires version-pattern and major/minor/patch patterns to have + * been configured. + */ + public SemanticVersion getNextSemanticVersion() throws GitChangelogRepositoryException { + final Changelog changelog = this.getChangelog(); + final List tags = this.getTagsAsStrings(changelog); + final List commits = this.getCommitMessages(changelog); + final String majorVersionPattern = this.settings.getSemanticMajorPattern().orNull(); + final String minorVersionPattern = this.settings.getSemanticMinorPattern().orNull(); + final SemanticVersioning semanticVersioning = + new SemanticVersioning(tags, commits, majorVersionPattern, minorVersionPattern); + return semanticVersioning.getNextVersion(); + } + + public SemanticVersion getHighestSemanticVersion() throws GitChangelogRepositoryException { + final Changelog changelog = this.getChangelog(); + final List tags = this.getTagsAsStrings(changelog); + final List commits = this.getCommitMessages(changelog); + final String majorVersionPattern = this.settings.getSemanticMajorPattern().orNull(); + final String minorVersionPattern = this.settings.getSemanticMinorPattern().orNull(); + final SemanticVersioning semanticVersioning = + new SemanticVersioning(tags, commits, majorVersionPattern, minorVersionPattern); + return semanticVersioning.getHighestVersion(); + } + + private List getCommitMessages(final Changelog changelog) { + return changelog + .getCommits() + .stream() + .map((it) -> it.getMessage()) + .collect(Collectors.toList()); + } + + private List getTagsAsStrings(final Changelog changelog) { + return changelog.getTags().stream().map((it) -> it.getName()).collect(Collectors.toList()); + } + + /** + * Will be used to determine next semantic version. + * + * @return + */ + public GitChangelogApi withSemanticPatterns(final String major, final String minor) + throws GitChangelogRepositoryException, IOException { + this.settings.setSemanticMajorPattern(major); + this.settings.setSemanticMinorPattern(minor); + return this; + } + + /** + * Registers Handlebars helper to use in template. + * + * @return + * @see https://github.com/jknack/handlebars.java/tree/master#with-plain-javascript + */ + public GitChangelogApi withHandlebarsHelper(final String javascriptHelper) + throws GitChangelogRepositoryException, IOException { + final int helperIndex = this.helperCounter.getAndIncrement(); + this.handlebars.registerHelpers("helper-" + helperIndex, javascriptHelper); + return this; } /** @@ -465,14 +546,15 @@ public GitChangelogApi withUntaggedName(final String untaggedName) { return this; } - private Changelog getChangelog(final GitRepo gitRepo, boolean shouldUseIntegrationIfConfigured) + private Changelog getChangelog( + final GitRepo gitRepo, final boolean shouldUseIntegrationIfConfigured) throws GitChangelogRepositoryException { - gitRepo.setTreeFilter(settings.getSubDirFilter()); + gitRepo.setTreeFilter(this.settings.getSubDirFilter()); final ObjectId fromId = - getId(gitRepo, this.settings.getFromRef(), this.settings.getFromCommit()) // + this.getId(gitRepo, this.settings.getFromRef(), this.settings.getFromCommit()) // .or(gitRepo.getCommit(ZERO_COMMIT)); final Optional toIdOpt = - getId(gitRepo, this.settings.getToRef(), this.settings.getToCommit()); + this.getId(gitRepo, this.settings.getToRef(), this.settings.getToCommit()); ObjectId toId; if (toIdOpt.isPresent()) { toId = toIdOpt.get(); @@ -486,12 +568,12 @@ private Changelog getChangelog(final GitRepo gitRepo, boolean shouldUseIntegrati this.settings.getUntaggedName(), this.settings.getIgnoreTagsIfNameMatches()); - if (!settings.getGitHubApi().isPresent()) { - settings.setGitHubApi(gitRepoData.findGitHubApi().orNull()); + if (!this.settings.getGitHubApi().isPresent()) { + this.settings.setGitHubApi(gitRepoData.findGitHubApi().orNull()); } - if (!settings.getGitLabServer().isPresent()) { - settings.setGitLabServer(gitRepoData.findGitLabServer().orNull()); - settings.setGitLabProjectName(gitRepoData.findOwnerName().orNull()); + if (!this.settings.getGitLabServer().isPresent()) { + this.settings.setGitLabServer(gitRepoData.findGitLabServer().orNull()); + this.settings.setGitLabProjectName(gitRepoData.findOwnerName().orNull()); } List diff = gitRepoData.getGitCommits(); diff --git a/src/main/java/se/bjurr/gitchangelog/internal/settings/Settings.java b/src/main/java/se/bjurr/gitchangelog/internal/settings/Settings.java index 3ac7673b..da403607 100644 --- a/src/main/java/se/bjurr/gitchangelog/internal/settings/Settings.java +++ b/src/main/java/se/bjurr/gitchangelog/internal/settings/Settings.java @@ -28,6 +28,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; import se.bjurr.gitchangelog.api.model.Changelog; import se.bjurr.gitchangelog.api.model.Issue; @@ -182,11 +184,17 @@ public class Settings implements Serializable { */ private String gitLabProjectName; + /** Regular expression to use when determining next semantic version based on commits. */ + private String semanticMajorPattern; + + /** Regular expression to use when determining next semantic version based on commits. */ + private String semanticMinorPattern; + public String getSubDirFilter() { - return fromNullable(subDirFilter).or(""); + return fromNullable(this.subDirFilter).or(""); } - public void setPathFilter(String subDirFilter) { + public void setPathFilter(final String subDirFilter) { this.subDirFilter = subDirFilter; } @@ -215,11 +223,11 @@ public void setToRef(final String toRef) { } public Optional getFromRef() { - return fromNullable(fromRef); + return fromNullable(this.fromRef); } public Optional getToRef() { - return fromNullable(toRef); + return fromNullable(this.toRef); } public void setFromRepo(final String fromRepo) { @@ -227,7 +235,7 @@ public void setFromRepo(final String fromRepo) { } public String getFromRepo() { - return fromNullable(fromRepo).or("."); + return fromNullable(this.fromRepo).or("."); } public void setIgnoreCommitsIfMessageMatches(final String ignoreCommitsIfMessageMatches) { @@ -255,34 +263,34 @@ public void setJiraServer(final String jiraServer) { } public void addCustomIssue(final SettingsIssue customIssue) { - if (customIssues == null) { - customIssues = newArrayList(); + if (this.customIssues == null) { + this.customIssues = newArrayList(); } - customIssues.add(customIssue); + this.customIssues.add(customIssue); } public List getCustomIssues() { - if (customIssues == null) { + if (this.customIssues == null) { return new ArrayList<>(); } else { - return customIssues; + return this.customIssues; } } public String getIgnoreCommitsIfMessageMatches() { - return fromNullable(ignoreCommitsIfMessageMatches).or(DEFAULT_IGNORE_COMMITS_REGEXP); + return fromNullable(this.ignoreCommitsIfMessageMatches).or(DEFAULT_IGNORE_COMMITS_REGEXP); } public Optional getIgnoreCommitsIfOlderThan() { - return fromNullable(ignoreCommitsIfOlderThan); + return fromNullable(this.ignoreCommitsIfOlderThan); } public String getJiraIssuePattern() { - return fromNullable(jiraIssuePattern).or(DEFAULT_JIRA_ISSUE_PATTEN); + return fromNullable(this.jiraIssuePattern).or(DEFAULT_JIRA_ISSUE_PATTEN); } public Optional getJiraServer() { - return fromNullable(jiraServer); + return fromNullable(this.jiraServer); } public static Settings fromFile(final URL url) { @@ -302,19 +310,19 @@ public void setToCommit(final String toCommit) { } public Optional getFromCommit() { - return fromNullable(emptyToNull(fromCommit)); + return fromNullable(emptyToNull(this.fromCommit)); } public Optional getToCommit() { - return fromNullable(emptyToNull(toCommit)); + return fromNullable(emptyToNull(this.toCommit)); } public String getUntaggedName() { - return fromNullable(untaggedName).or(DEFAULT_UNTAGGED_NAME); + return fromNullable(this.untaggedName).or(DEFAULT_UNTAGGED_NAME); } public Optional getIgnoreTagsIfNameMatches() { - return fromNullable(ignoreTagsIfNameMatches); + return fromNullable(this.ignoreTagsIfNameMatches); } public void setUntaggedName(final String untaggedName) { @@ -322,7 +330,7 @@ public void setUntaggedName(final String untaggedName) { } public String getTemplatePath() { - return fromNullable(templatePath).or("changelog.mustache"); + return fromNullable(this.templatePath).or("changelog.mustache"); } public void setTemplatePath(final String templatePath) { @@ -330,11 +338,11 @@ public void setTemplatePath(final String templatePath) { } public String getReadableTagName() { - return fromNullable(readableTagName).or(DEFAULT_READABLE_TAG_NAME); + return fromNullable(this.readableTagName).or(DEFAULT_READABLE_TAG_NAME); } public String getDateFormat() { - return fromNullable(dateFormat).or(DEFAULT_DATEFORMAT); + return fromNullable(this.dateFormat).or(DEFAULT_DATEFORMAT); } public void setDateFormat(final String dateFormat) { @@ -350,7 +358,7 @@ public void setReadableTagName(final String readableTagName) { } public String getNoIssueName() { - return fromNullable(noIssueName).or(DEFAULT_NO_ISSUE_NAME); + return fromNullable(this.noIssueName).or(DEFAULT_NO_ISSUE_NAME); } public void setTimeZone(final String timeZone) { @@ -358,7 +366,7 @@ public void setTimeZone(final String timeZone) { } public String getTimeZone() { - return fromNullable(timeZone).or(DEFAULT_TIMEZONE); + return fromNullable(this.timeZone).or(DEFAULT_TIMEZONE); } public static Settings defaultSettings() { @@ -376,15 +384,15 @@ public void setRemoveIssueFromMessage(final boolean removeIssueFromMessage) { } public Boolean removeIssueFromMessage() { - return fromNullable(removeIssueFromMessage).or(DEFAULT_REMOVE_ISSUE); + return fromNullable(this.removeIssueFromMessage).or(DEFAULT_REMOVE_ISSUE); } public Optional getGitHubApi() { - return fromNullable(gitHubApi); + return fromNullable(this.gitHubApi); } public Optional getGitHubToken() { - return fromNullable(gitHubToken); + return fromNullable(this.gitHubToken); } public void setGitHubApi(final String gitHubApi) { @@ -400,11 +408,11 @@ public void setGitHubIssuePattern(final String gitHubIssuePattern) { } public String getGitHubIssuePattern() { - return fromNullable(gitHubIssuePattern).or(DEFAULT_GITHUB_ISSUE_PATTERN); + return fromNullable(this.gitHubIssuePattern).or(DEFAULT_GITHUB_ISSUE_PATTERN); } public Optional getJiraUsername() { - return fromNullable(jiraUsername); + return fromNullable(this.jiraUsername); } public void setJiraPassword(final String jiraPassword) { @@ -420,11 +428,11 @@ public void setJiraUsername(final String jiraUsername) { } public Optional getJiraPassword() { - return fromNullable(jiraPassword); + return fromNullable(this.jiraPassword); } public Optional getJiraToken() { - return fromNullable(jiraToken); + return fromNullable(this.jiraToken); } public void setExtendedVariables(final Map extendedVariables) { @@ -432,11 +440,11 @@ public void setExtendedVariables(final Map extendedVariables) { } public Map getExtendedVariables() { - return extendedVariables; + return this.extendedVariables; } public Map getExtendedRestHeaders() { - return extendedRestHeaders; + return this.extendedRestHeaders; } public void setExtendedRestHeaders(final Map extendedRestHeaders) { @@ -448,7 +456,7 @@ public void setIgnoreCommitsWithoutIssue(final boolean ignoreCommitsWithoutIssue } public boolean ignoreCommitsWithoutIssue() { - return ignoreCommitsWithoutIssue; + return this.ignoreCommitsWithoutIssue; } public void setGitLabIssuePattern(final String gitLabIssuePattern) { @@ -468,18 +476,43 @@ public void setGitLabToken(final String gitLabToken) { } public Optional getGitLabServer() { - return fromNullable(gitLabServer); + return fromNullable(this.gitLabServer); } public Optional getGitLabToken() { - return fromNullable(gitLabToken); + return fromNullable(this.gitLabToken); } public String getGitLabIssuePattern() { - return fromNullable(gitLabIssuePattern).or(DEFAULT_GITLAB_ISSUE_PATTERN); + return fromNullable(this.gitLabIssuePattern).or(DEFAULT_GITLAB_ISSUE_PATTERN); } public Optional getGitLabProjectName() { - return fromNullable(gitLabProjectName); + return fromNullable(this.gitLabProjectName); + } + + public Optional getSemanticMajorPattern() { + return fromNullable(this.semanticMajorPattern); + } + + public void setSemanticMajorPattern(final String semanticMajorPattern) { + this.semanticMajorPattern = this.isRegexp(semanticMajorPattern, "semanticMajorPattern"); + } + + public Optional getSemanticMinorPattern() { + return fromNullable(this.semanticMinorPattern); + } + + public void setSemanticMinorPattern(final String semanticMinorPattern) { + this.semanticMinorPattern = this.isRegexp(semanticMinorPattern, "semanticMinorPattern"); + } + + private String isRegexp(final String pattern, final String string) { + try { + Pattern.compile(pattern); + } catch (final PatternSyntaxException e) { + throw new RuntimeException(pattern + " in " + string + " is not valid regexp."); + } + return pattern; } } diff --git a/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersion.java b/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersion.java new file mode 100644 index 00000000..395c5f37 --- /dev/null +++ b/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersion.java @@ -0,0 +1,42 @@ +package se.bjurr.gitchangelog.semantic; + +import java.util.Optional; + +public class SemanticVersion { + private final int patch; + private final int minor; + private final int major; + private String tag; + + public SemanticVersion(final int major, final int minor, final int patch) { + this.major = major; + this.minor = minor; + this.patch = patch; + } + + public int getMajor() { + return this.major; + } + + public int getMinor() { + return this.minor; + } + + public int getPatch() { + return this.patch; + } + + @Override + public String toString() { + return this.major + "." + this.minor + "." + this.patch; + } + + public void setTag(final String tag) { + this.tag = tag; + } + + /** Present if this is an existing tag in the repo. */ + public Optional findTag() { + return Optional.ofNullable(this.tag); + } +} diff --git a/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersioning.java b/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersioning.java new file mode 100644 index 00000000..167a5a79 --- /dev/null +++ b/src/main/java/se/bjurr/gitchangelog/semantic/SemanticVersioning.java @@ -0,0 +1,94 @@ +package se.bjurr.gitchangelog.semantic; + +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class SemanticVersioning { + + public enum VERSION_STEP { + MAJOR, + MINOR, + PATCH + } + + private final List tags; + private final List commits; + private final Pattern majorPattern; + private final Pattern minorPattern; + + public SemanticVersioning( + final List tags, + final List commits, + final String majorPattern, + final String minorPattern) { + this.tags = tags; + this.commits = commits; + this.majorPattern = Pattern.compile(this.notNull(majorPattern, "majorPattern")); + this.minorPattern = Pattern.compile(this.notNull(minorPattern, "minorPattern")); + } + + private String notNull(final String value, final String msg) { + if (value == null) { + throw new RuntimeException(msg + " is not defined"); + } + return value; + } + + public SemanticVersion getNextVersion() { + final SemanticVersion highestVersion = this.getHighestVersion(); + final VERSION_STEP versionStep = this.getVersionStep(); + if (versionStep == VERSION_STEP.MAJOR) { + return new SemanticVersion(highestVersion.getMajor() + 1, 0, 0); + } else if (versionStep == VERSION_STEP.MINOR) { + return new SemanticVersion(highestVersion.getMajor(), highestVersion.getMinor() + 1, 0); + } + return new SemanticVersion( + highestVersion.getMajor(), highestVersion.getMinor(), highestVersion.getPatch() + 1); + } + + public SemanticVersion getHighestVersion() { + SemanticVersion highest = new SemanticVersion(0, 0, 0); + for (final String tag : this.tags) { + final Matcher semanticVersionMatcher = + Pattern.compile("[0-9]+\\.[0-9]+\\.[0-9]+").matcher(tag.replaceAll("[^0-9\\.]", "")); + if (semanticVersionMatcher.find()) { + final String[] dotParts = semanticVersionMatcher.group().split("\\."); + final SemanticVersion candidate = + new SemanticVersion( + new Integer(dotParts[0]), // + new Integer(dotParts[1]), // + new Integer(dotParts[2])); + candidate.setTag(tag); + if (candidate.getMajor() > highest.getMajor()) { + highest = candidate; + continue; + } + if (candidate.getMajor() == highest.getMajor() + && candidate.getMinor() > highest.getMinor()) { + highest = candidate; + continue; + } + if (candidate.getMajor() == highest.getMajor() + && candidate.getMinor() == highest.getMinor() + && candidate.getPatch() > highest.getPatch()) { + highest = candidate; + continue; + } + } + } + return highest; + } + + private VERSION_STEP getVersionStep() { + VERSION_STEP versionStep = VERSION_STEP.PATCH; + for (final String commit : this.commits) { + if (this.majorPattern.matcher(commit).find()) { + return VERSION_STEP.MAJOR; + } else if (this.minorPattern.matcher(commit).find()) { + versionStep = VERSION_STEP.MINOR; + } + } + return versionStep; + } +} diff --git a/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.java b/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.java new file mode 100644 index 00000000..6762c2a1 --- /dev/null +++ b/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.java @@ -0,0 +1,33 @@ +package se.bjurr.gitchangelog.api; + +import static se.bjurr.gitchangelog.api.GitChangelogApi.gitChangelogApiBuilder; + +import org.junit.Before; +import org.junit.Test; +import se.bjurr.gitchangelog.test.ApprovalsWrapper; + +public class HandlebarsHelperTest { + private GitChangelogApi baseBuilder; + + @Before + public void before() { + this.baseBuilder = + gitChangelogApiBuilder() // + .withFromRepo(".") // + .withFromCommit("1edc0d7") // + .withToCommit("e78a62f"); + } + + @Test + public void testThatHelperCanBeSuppliedWithJavascript() throws Exception { + final GitChangelogApi given = + this.baseBuilder // + .withTemplatePath("templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache") + .withHandlebarsHelper( + "Handlebars.registerHelper(\"firstWord\", function(options) {" + + " return options.fn(this).split(\" \")[0];" + + "});"); + + ApprovalsWrapper.verify(given); + } +} diff --git a/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.testThatHelperCanBeSuppliedWithJavascript.approved.txt b/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.testThatHelperCanBeSuppliedWithJavascript.approved.txt new file mode 100644 index 00000000..80dcb854 --- /dev/null +++ b/src/test/java/se/bjurr/gitchangelog/api/HandlebarsHelperTest.testThatHelperCanBeSuppliedWithJavascript.approved.txt @@ -0,0 +1,1612 @@ +template: + +{{#commits}} + First word: {{#firstWord}}{{message}}{{/firstWord}} + + All of message: + + {{message}} +-------------------------------- + + +{{/commits}} + + +--------------------------------------------- + +settings: + +{ + "fromRepo": ".", + "fromCommit": "1edc0d7", + "toCommit": "e78a62f", + "templatePath": "templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache", + "removeIssueFromMessage": false, + "gitHubApi": "https://api.github.com/repos/tomasbjerre/git-changelog-lib", + "extendedVariables": {}, + "ignoreCommitsWithoutIssue": false, + "gitLabProjectName": "tomasbjerre" +} + +--------------------------------------------- + +changelog: + + First word: [Gradle + + All of message: + + [Gradle Release Plugin] - new version commit: '1.97-SNAPSHOT'. +-------------------------------- + + + First word: [Gradle + + All of message: + + [Gradle Release Plugin] - pre tag commit: '1.96'. +-------------------------------- + + + First word: pretty + + All of message: + + pretty printing output JENKINS-65252 +-------------------------------- + + + First word: [Gradle + + All of message: + + [Gradle Release Plugin] - new version commit: '1.96-SNAPSHOT'. +-------------------------------- + + + First word: [Gradle + + All of message: + + [Gradle Release Plugin] - pre tag commit: '1.95'. +-------------------------------- + + + First word: Removing + + All of message: + + Removing default ignore filter on message + +It was: `^\[maven-release-plugin\].*|^\[Gradle Release Plugin\].*|^Merge.*"` + +But users are confused by this and it is probably better to have no filter by default. +-------------------------------- + + + First word: Switching + + All of message: + + Switching to Handlebars from Mustache + + * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api + * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r. + * Refactoring tests to use Approvals. +-------------------------------- + + + First word: [Gradle + + All of message: + + [Gradle Release Plugin] - new version commit: '1.95-SNAPSHOT'. +-------------------------------- + + + + +--------------------------------------------- + +context: + +{ + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "tags": [ + { + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "issueTypes": [ + { + "name": "No issue", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "type": "NOISSUE" + } + ], + "name": "Unreleased", + "tagTime": "", + "tagTimeLong": -1, + "hasTagTime": false + }, + { + "annotation": "[Gradle Release Plugin] - creating tag: \u00271.96\u0027.\n", + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "JENKINS-65252", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + }, + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "issueTypes": [ + { + "name": "Jira", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "JENKINS-65252", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + } + ], + "type": "JIRA" + }, + { + "name": "No issue", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "type": "NOISSUE" + } + ], + "name": "1.96", + "tagTime": "2021-03-29 15:34:15", + "tagTimeLong": 1617032055000, + "hasTagTime": true + }, + { + "annotation": "[Gradle Release Plugin] - creating tag: \u00271.95\u0027.\n", + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "mediawiki-1", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + }, + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "issueTypes": [ + { + "name": "Jira", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "mediawiki-1", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + } + ], + "type": "JIRA" + }, + { + "name": "No issue", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "type": "NOISSUE" + } + ], + "name": "1.95", + "tagTime": "2021-01-18 16:48:34", + "tagTimeLong": 1610988514000, + "hasTagTime": true + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "JENKINS-65252", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + }, + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "mediawiki-1", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + }, + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "issueTypes": [ + { + "name": "Jira", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:33:00", + "commitTimeLong": 1617031980000, + "hash": "bea18ab90db148c", + "hashFull": "bea18ab90db148c3f9a90078424bd6ea36dd5108", + "merge": false, + "message": "pretty printing output JENKINS-65252" + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "JENKINS-65252", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + }, + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-12-24 07:11:41", + "commitTimeLong": 1608793901000, + "hash": "7eba3d038b884b8", + "hashFull": "7eba3d038b884b845644c202f6a98632d52fbb9e", + "merge": false, + "message": "Switching to Handlebars from Mustache\n\n * Removing Mediawiki support. Because I have not been able to make it work. https://stackoverflow.com/questions/45779754/cannot-authenticate-with-mediawiki-1-28-api\n * Steeping up JGit to latest release. 3.6.2.201501210735-r to 5.10.0.202012080955-r.\n * Refactoring tests to use Approvals." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "Jira", + "title": "", + "hasTitle": false, + "issue": "mediawiki-1", + "hasIssue": true, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "JIRA" + } + ], + "type": "JIRA" + }, + { + "name": "No issue", + "issues": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authors": [ + { + "commits": [ + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:35:07", + "commitTimeLong": 1617032107000, + "hash": "e78a62ffbb9b57c", + "hashFull": "e78a62ffbb9b57cf2b274bab18c7b65eadaf6015", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.97-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-03-29 15:34:15", + "commitTimeLong": 1617032055000, + "hash": "81936b9d6d9bbb8", + "hashFull": "81936b9d6d9bbb84ff860e4e08e132a13909ea16", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.96\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:49:30", + "commitTimeLong": 1610988570000, + "hash": "8cda1f4c79c8891", + "hashFull": "8cda1f4c79c8891510fa81fbb65e6955d4337e33", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.96-SNAPSHOT\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:48:34", + "commitTimeLong": 1610988514000, + "hash": "da85629f0a0d922", + "hashFull": "da85629f0a0d92298c2be0193324a0bc2281f929", + "merge": false, + "message": "[Gradle Release Plugin] - pre tag commit: \u00271.95\u0027." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2021-01-18 16:46:13", + "commitTimeLong": 1610988373000, + "hash": "a57e321f08cea10", + "hashFull": "a57e321f08cea10843cc8c7d1c41a1d03318e8d6", + "merge": false, + "message": "Removing default ignore filter on message\n\nIt was: `^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*\"`\n\nBut users are confused by this and it is probably better to have no filter by default." + }, + { + "authorEmailAddress": "tomas.bjerre85@gmail.com", + "authorName": "Tomas Bjerre", + "commitTime": "2020-11-18 17:16:03", + "commitTimeLong": 1605719763000, + "hash": "73f54645bd6f6fa", + "hashFull": "73f54645bd6f6fa17543337ac4b66451f37f03c6", + "merge": false, + "message": "[Gradle Release Plugin] - new version commit: \u00271.95-SNAPSHOT\u0027." + } + ], + "authorName": "Tomas Bjerre", + "authorEmail": "tomas.bjerre85@gmail.com" + } + ], + "name": "No issue", + "title": "", + "hasTitle": false, + "issue": "", + "hasIssue": false, + "link": "", + "hasLink": false, + "type": "", + "hasType": false, + "hasDescription": false, + "description": "", + "hasLabels": false, + "hasLinkedIssues": false, + "issueType": "NOISSUE" + } + ], + "type": "NOISSUE" + } + ], + "ownerName": "tomasbjerre", + "repoName": "git-changelog-lib" +} \ No newline at end of file diff --git a/src/test/java/se/bjurr/gitchangelog/semantic/SemanticVersioningTest.java b/src/test/java/se/bjurr/gitchangelog/semantic/SemanticVersioningTest.java new file mode 100644 index 00000000..d4cc7e95 --- /dev/null +++ b/src/test/java/se/bjurr/gitchangelog/semantic/SemanticVersioningTest.java @@ -0,0 +1,67 @@ +package se.bjurr.gitchangelog.semantic; + +import static org.assertj.core.api.Assertions.assertThat; +import static se.bjurr.gitchangelog.api.GitChangelogApi.gitChangelogApiBuilder; + +import java.util.ArrayList; +import java.util.List; +import org.junit.Before; +import org.junit.Test; +import se.bjurr.gitchangelog.api.GitChangelogApi; + +public class SemanticVersioningTest { + + private List tags; + private List commits; + private String majorPattern; + private String minorPattern; + private SemanticVersioning sut; + + @Before + public void before() { + this.tags = new ArrayList(); + this.commits = new ArrayList(); + this.majorPattern = "[Bb]reaking:.*"; + this.minorPattern = "[Uu]pdate:.*"; + this.sut = + new SemanticVersioning(this.tags, this.commits, this.majorPattern, this.minorPattern); + } + + @Test + public void smokeTest() throws Throwable { + final GitChangelogApi builder = + gitChangelogApiBuilder() // + .withToCommit("7c1c366") // + .withSemanticPatterns("breaking:.*", "update:.*"); + + assertThat(builder.getNextSemanticVersion().toString()).isEqualTo("1.144.5"); + assertThat(builder.getHighestSemanticVersion().toString()).isEqualTo("1.144.4"); + } + + @Test + public void testMajorStep() throws Throwable { + this.tags.add("v1.0.0"); + this.commits.add("breaking: whatever"); + + assertThat(this.sut.getHighestVersion() + " -> " + this.sut.getNextVersion()) // + .isEqualTo("1.0.0 -> 2.0.0"); + } + + @Test + public void testMinorStep() throws Throwable { + this.tags.add("v1.0.0"); + this.commits.add("update: whatever"); + + assertThat(this.sut.getHighestVersion() + " -> " + this.sut.getNextVersion()) // + .isEqualTo("1.0.0 -> 1.1.0"); + } + + @Test + public void testPatchStep() throws Throwable { + this.tags.add("v1.0.0"); + this.commits.add("chore: whatever"); + + assertThat(this.sut.getHighestVersion() + " -> " + this.sut.getNextVersion()) // + .isEqualTo("1.0.0 -> 1.0.1"); + } +} diff --git a/src/test/resources/templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache b/src/test/resources/templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache new file mode 100644 index 00000000..fc5b0492 --- /dev/null +++ b/src/test/resources/templatetest/testThatHelperCanBeSuppliedWithJavascript.mustache @@ -0,0 +1,10 @@ +{{#commits}} + First word: {{#firstWord}}{{message}}{{/firstWord}} + + All of message: + + {{message}} +-------------------------------- + + +{{/commits}}