generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Auto categorize CLI flag #212
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
933dd06
feat: categorize conventional commits
jake-perkins ebc0ace
feat: testing conv commit feat
jake-perkins a7b610b
fix: testing conv commit
jake-perkins 84002cf
testing
jake-perkins 91146dc
remove logs
jake-perkins 130f807
fix: format
jake-perkins f073675
update changelog
jake-perkins d03de77
newline
jake-perkins d60a767
formoat changelog
jake-perkins 2195646
format changelog
jake-perkins b8f20d8
readme
jake-perkins b50bcfb
reset changelog
jake-perkins c1dad45
Update src/cli.ts
jake-perkins de24e91
Update README.md
jake-perkins 65ef5a1
code review fixes
jake-perkins 04564c8
unit tests for new code
jake-perkins 02ed50d
lint
jake-perkins bc49099
testing pipeline unit test failures
jake-perkins 3ae6459
debug tests
jake-perkins ed7282e
debug for unit tests
jake-perkins cfecb8e
testing
jake-perkins 23eff89
updated tests
jake-perkins 61e961a
remove logging statements
jake-perkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,53 @@ | ||
| import * as ChangeLogManager from './update-changelog'; | ||
|
|
||
| const uncategorizedChangelog = `# Changelog | ||
| All notable changes to this project will be documented in this file. | ||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
| ## [Unreleased] | ||
| ## [1.0.0] | ||
| ### Uncategorized | ||
| - fix: a commit of the type fix patches a bug in your codebase | ||
| - feat: a commit of the type feat introduces a new feature to the codebase | ||
| - unknown: a commit of the type unknown does not match any of the conventional commit types | ||
| [Unreleased]: https://github.com/ExampleUsernameOrOrganization/ExampleRepository/ | ||
| `; | ||
|
|
||
| describe('updateChangelog', () => { | ||
| it('should contain conventional support mappings categorization', async () => { | ||
| // Call updateChangelog, which internally calls the mocked getNewChangeEntries | ||
| const result = await ChangeLogManager.updateChangelog({ | ||
| changelogContent: uncategorizedChangelog, | ||
| currentVersion: '1.0.0', | ||
| repoUrl: | ||
| 'https://github.com/ExampleUsernameOrOrganization/ExampleRepository', | ||
| isReleaseCandidate: true, | ||
| autoCategorize: true, | ||
| }); | ||
|
|
||
| console.log(result); | ||
jake-perkins marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Verify that some of the commits are included in the result | ||
| expect(result).toContain('### Fixed'); | ||
| }); | ||
|
|
||
| it('should not contain conventional support mappings categorization', async () => { | ||
| // Call updateChangelog, which internally calls the mocked getNewChangeEntries | ||
| const result = await ChangeLogManager.updateChangelog({ | ||
| changelogContent: uncategorizedChangelog, | ||
| currentVersion: '1.0.0', | ||
| repoUrl: | ||
| 'https://github.com/ExampleUsernameOrOrganization/ExampleRepository', | ||
| isReleaseCandidate: true, | ||
| autoCategorize: false, | ||
| }); | ||
|
|
||
| // Verify that some of the commits are included in the result | ||
| expect(result).toContain('### Uncategorized'); | ||
| expect(result).not.toContain('### Fixed'); | ||
| }); | ||
| }); | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.