generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- sample showcase test for transform feature
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {resolveConfiguration} from '../src/utils' | ||
import {ReleaseNotesBuilder} from '../src/releaseNotesBuilder' | ||
|
||
jest.setTimeout(180000) | ||
|
||
it('Should properly generate changelog', async () => { | ||
const configuration = resolveConfiguration('', 'configs_test/configuration_fronius.json') | ||
const releaseNotesBuilder = new ReleaseNotesBuilder( | ||
null, | ||
'.', | ||
'ccremer', | ||
'charts', | ||
null, | ||
'fronius-stack-0.2.0', | ||
false, | ||
true, | ||
false, | ||
configuration | ||
) | ||
|
||
const changeLog = await releaseNotesBuilder.build() | ||
console.log(changeLog) | ||
expect(changeLog).toStrictEqual(`1 changes since fronius-stack-0.1.2\n\n## 📄 Documentation\n\n- [fronius-stack] Bogus change to test changelog generator (#93)\n\n`) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"pr_template": "- ${{TITLE}} (#${{NUMBER}})", | ||
"categories": [ | ||
{ | ||
"title": "## 🚀 Features", | ||
"labels": [ | ||
"enhancement", | ||
"feature" | ||
] | ||
}, | ||
{ | ||
"title": "## 🛠️ Minor Changes", | ||
"labels": [ | ||
"change" | ||
] | ||
}, | ||
{ | ||
"title": "## 🔎 Breaking Changes", | ||
"labels": [ | ||
"breaking" | ||
] | ||
}, | ||
{ | ||
"title": "## 🐛 Fixes", | ||
"labels": [ | ||
"bug", | ||
"fix" | ||
] | ||
}, | ||
{ | ||
"title": "## 📄 Documentation", | ||
"labels": [ | ||
"documentation" | ||
] | ||
}, | ||
{ | ||
"title": "## 🔗 Dependency Updates", | ||
"labels": [ | ||
"dependency" | ||
] | ||
} | ||
], | ||
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}", | ||
"label_extractor": [ | ||
{ | ||
"pattern": "^(?!\\[fronius-stack\\])", | ||
"method": "replace", | ||
"target": "ignore", | ||
"on_property": "title" | ||
} | ||
], | ||
"tag_resolver": { | ||
"filter": { | ||
"pattern": "fronius-stack-(.+)" | ||
}, | ||
"transformer": { | ||
"pattern": "fronius-stack-(.+)", | ||
"target": "$1" | ||
} | ||
} | ||
} |