Skip to content

Commit

Permalink
chore: Updated release note headers to follow standard sentence caps(#…
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyarnold authored Oct 12, 2023
1 parent 3a210ad commit 91d3600
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions bin/conventional-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const Github = require('./github')

// TODO: for reviewers: decide if we want to show all of these, or if there are some that should always be hidden
const RELEASE_NOTE_TYPES = [
{ type: 'build', section: 'Build System', rank: 12 },
{ type: 'chore', section: 'Miscellaneous Chores', rank: 8 },
{ type: 'ci', section: 'Continuous Integration', rank: 11 },
{ type: 'build', section: 'Build system', rank: 12 },
{ type: 'chore', section: 'Miscellaneous chores', rank: 8 },
{ type: 'ci', section: 'Continuous integration', rank: 11 },
{ type: 'docs', section: 'Documentation', rank: 7 },
{ type: 'feat', section: 'Features', rank: 0 },
{ type: 'fix', section: 'Bug Fixes', rank: 1 },
{ type: 'perf', section: 'Performance Improvements', rank: 4 },
{ type: 'refactor', section: 'Code Refactoring', rank: 5 },
{ type: 'fix', section: 'Bug fixes', rank: 1 },
{ type: 'perf', section: 'Performance improvements', rank: 4 },
{ type: 'refactor', section: 'Code refactoring', rank: 5 },
{ type: 'revert', section: 'Reverts', rank: 6 },
{ type: 'security', section: 'Security Improvements', rank: 2 },
{ type: 'security', section: 'Security improvements', rank: 2 },
{ type: 'style', section: 'Styles', rank: 9 },
{ type: 'test', section: 'Tests', rank: 10 }
]
Expand Down
30 changes: 15 additions & 15 deletions bin/test/conventional-changelog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const exampleMarkdown = `### v1.0.0 (2020-04-03)
* **thing:** updated Thing to prevent modifications to inputs
#### Bug Fixes
#### Bug fixes
* **thing:** updated Thing to prevent modifications to inputs ([#123](https://github.com/newrelic/node-newrelic/pull/123)), closes [1234](https://github.com/newrelic/node-newrelic/issues/1234)
* Thing no longer mutates provided inputs, but instead clones inputs before performing modifications. Thing will now always return an entirely new output
Expand Down Expand Up @@ -95,34 +95,34 @@ tap.test('Conventional Changelog Class', (testHarness) => {
const changelog = new ConventionalChangelog({ newVersion: '1.0.0', previousVersion: '0.9.0' })

const groupedCommits = [
{ title: 'Build System', commits: [] },
{ title: 'Miscellaneous Chores', commits: [] },
{ title: 'Continuous Integration', commits: [] },
{ title: 'Build system', commits: [] },
{ title: 'Miscellaneous chores', commits: [] },
{ title: 'Continuous integration', commits: [] },
{ title: 'Documentation', commits: [] },
{ title: 'Features', commits: [] },
{ title: 'Bug Fixes', commits: [] },
{ title: 'Performance Improvements', commits: [] },
{ title: 'Code Refactoring', commits: [] },
{ title: 'Bug fixes', commits: [] },
{ title: 'Performance improvements', commits: [] },
{ title: 'Code refactoring', commits: [] },
{ title: 'Reverts', commits: [] },
{ title: 'Security Improvements', commits: [] },
{ title: 'Security improvements', commits: [] },
{ title: 'Styles', commits: [] },
{ title: 'Tests', commits: [] }
]

groupedCommits.sort(changelog.rankedGroupSort)

t.equal(groupedCommits[0].title, 'Features')
t.equal(groupedCommits[1].title, 'Bug Fixes')
t.equal(groupedCommits[2].title, 'Security Improvements')
t.equal(groupedCommits[3].title, 'Performance Improvements')
t.equal(groupedCommits[4].title, 'Code Refactoring')
t.equal(groupedCommits[1].title, 'Bug fixes')
t.equal(groupedCommits[2].title, 'Security improvements')
t.equal(groupedCommits[3].title, 'Performance improvements')
t.equal(groupedCommits[4].title, 'Code refactoring')
t.equal(groupedCommits[5].title, 'Reverts')
t.equal(groupedCommits[6].title, 'Documentation')
t.equal(groupedCommits[7].title, 'Miscellaneous Chores')
t.equal(groupedCommits[7].title, 'Miscellaneous chores')
t.equal(groupedCommits[8].title, 'Styles')
t.equal(groupedCommits[9].title, 'Tests')
t.equal(groupedCommits[10].title, 'Continuous Integration')
t.equal(groupedCommits[11].title, 'Build System')
t.equal(groupedCommits[10].title, 'Continuous integration')
t.equal(groupedCommits[11].title, 'Build system')

t.end()
})
Expand Down

0 comments on commit 91d3600

Please sign in to comment.