-
Notifications
You must be signed in to change notification settings - Fork 38
Feature/add changelog link #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,7 +176,8 @@ describe("ChangelogLib lib", () => { | |
| setupCommon(); | ||
| issues[0].labels = ["breaking change", "enhancement"]; | ||
| mergeRequests[0].labels = ["bug", "feature"]; | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}); | ||
| tags = ["0.1.1", "0.1.0"]; | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}, {tags, fullChangelogLink: true}); | ||
| }); | ||
| afterAll(() => { | ||
| cleanUpCommon(); | ||
|
|
@@ -198,7 +199,8 @@ describe("ChangelogLib lib", () => { | |
| describe("Without labels", () => { | ||
| beforeAll(async () => { | ||
| setupCommon(); | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}); | ||
| tags = ["0.1.1", "0.1.0"]; | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}, {tags, fullChangelogLink: true}); | ||
| }); | ||
| afterAll(() => { | ||
| cleanUpCommon(); | ||
|
|
@@ -211,5 +213,47 @@ describe("ChangelogLib lib", () => { | |
| "- test1 [#1](http://gitlab.example.com/my-group/my-project/merge_requests/1) ([admin](https://gitlab.example.com/admin))\n"); | ||
| }); | ||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a test case with fullChangeLogLink please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added, but as mentioned in the description, I'm unable to test (or could you explain how to test?) |
||
| describe("With labels and without full changelog link", () => { | ||
| beforeAll(async () => { | ||
| setupCommon(); | ||
| issues[0].labels = ["breaking change", "enhancement"]; | ||
| mergeRequests[0].labels = ["bug", "feature"]; | ||
| tags = ["0.1.1", "0.1.0"]; | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}, {tags); | ||
| }); | ||
| afterAll(() => { | ||
| cleanUpCommon(); | ||
| }); | ||
| test("should render changelog in markdown without full changelog link", () => { | ||
| expect(changelog).toEqual("### Release note (2019-06-02)\n" + | ||
| "#### Notable changes\n" + | ||
| "- Consequatur vero maxime deserunt laboriosam est voluptas dolorem. [#6](http://example.com/example/example/issues/6)\n" + | ||
| "#### Enhancements\n" + | ||
| "- Consequatur vero maxime deserunt laboriosam est voluptas dolorem. [#6](http://example.com/example/example/issues/6)\n" + | ||
| "#### New features\n" + | ||
| "- test1 [#1](http://gitlab.example.com/my-group/my-project/merge_requests/1) ([admin](https://gitlab.example.com/admin))\n" + | ||
| "#### Fixed bugs\n" + | ||
| "- test1 [#1](http://gitlab.example.com/my-group/my-project/merge_requests/1) ([admin](https://gitlab.example.com/admin))\n" + | ||
| "#### Closed issues\n" + | ||
| "#### Merged merge requests\n") | ||
| }); | ||
| }); | ||
| describe("Without labels and without full changelog link", () => { | ||
| beforeAll(async () => { | ||
| setupCommon(); | ||
| tags = ["0.1.1", "0.1.0"]; | ||
| changelog = await ChangelogLib.generateChangeLogContent({releaseDate, issues, mergeRequests}, {tags}); | ||
| }); | ||
| afterAll(() => { | ||
| cleanUpCommon(); | ||
| }); | ||
| test("should render changelog in markdown without full changelog link", () => { | ||
| expect(changelog).toEqual("### Release note (2019-06-02)\n" + | ||
| "#### Closed issues\n" + | ||
| "- Consequatur vero maxime deserunt laboriosam est voluptas dolorem. [#6](http://example.com/example/example/issues/6)\n" + | ||
| "#### Merged merge requests\n" + | ||
| "- test1 [#1](http://gitlab.example.com/my-group/my-project/merge_requests/1) ([admin](https://gitlab.example.com/admin))\n"); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.