- introduce new flag to include open PRs into the changelog

- only fetch open with this flag
- expand pull request spec with
  - status, created at timestamp
- expand definition for placeholder patterns in the changelog
This commit is contained in:
Mike Penz
2022-04-08 11:00:39 +02:00
parent 7a59e9f4b4
commit 85af6a8181
10 changed files with 333 additions and 58 deletions
+37
View File
@@ -16,6 +16,7 @@ it('Should match generated changelog (unspecified fromTag)', async () => {
false,
false,
false,
false,
configuration
)
@@ -42,6 +43,7 @@ it('Should match generated changelog (unspecified tags)', async () => {
false,
false,
false,
false,
configuration
)
@@ -65,6 +67,7 @@ it('Should use empty placeholder', async () => {
false,
false,
false,
false,
configuration
)
@@ -89,6 +92,7 @@ it('Should fill empty placeholders', async () => {
false,
false,
false,
false,
configuration
)
@@ -115,6 +119,7 @@ it('Should fill `template` placeholders', async () => {
false,
false,
false,
false,
configuration
)
@@ -141,6 +146,7 @@ it('Should fill `template` placeholders, ignore', async () => {
false,
false,
false,
false,
configuration
)
@@ -167,6 +173,7 @@ it('Uncategorized category', async () => {
false,
false,
false,
false,
configuration
)
@@ -192,6 +199,7 @@ it('Verify commit based changelog', async () => {
'v0.0.3',
false,
false,
false,
true,
configuration
)
@@ -218,6 +226,7 @@ it('Verify commit based changelog, with emoji categorisation', async () => {
'17a9e4dfaedcabe6a6eff2754bebb715e1c58ec4',
false,
false,
false,
true,
configuration
)
@@ -228,3 +237,31 @@ it('Verify commit based changelog, with emoji categorisation', async () => {
`## 🚀 Features\n\n- add dynamic merging\n- add auto-cleaning\n- add built-in adb support\n- add adb fallback (thanks to @mikepenz ;))\n- add install note\n- add @mikepenz to credits\n\n## 🐛 Fixes\n\n- fix dynamic lib replacement\n- fix apostrophe issue with app name\n- fix java.util.logger error\n\n## 💬 Other\n\n- update screenshot with truecaller stack\n\n`
)
})
it('Verify inclusion of open PRs', async () => {
const configuration = resolveConfiguration(
'',
'configs_test/configuration_commits_emoji.json'
)
const releaseNotesBuilder = new ReleaseNotesBuilder(
null, // baseUrl
null, // token
'.', // repoPath
'mikepenz', // user
'release-changelog-builder-action-playground', // repo
'1.5.0', // fromTag
'2.0.0', // toTag
true, // includeOpen
false, // failOnError
false, // ignorePrePrelease
true, // commitMode
configuration // configuration
)
const changeLog = await releaseNotesBuilder.build()
console.log(changeLog)
expect(changeLog).toStrictEqual(
``
)
})