File tree Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Original file line number Diff line number Diff line change 2828
2929` yarn run auto-changelog update --autoCategorize `
3030
31+ #### Read the "CHANGELOG entry:" on the PR
32+
33+ ` yarn run auto-changelog update --useChangelogEntry `
34+
35+ #### Use Short PR links
36+
37+ - Like ` (#247) ` instead of ` ([#247](https://github.com/MetaMask/auto-changelog/pull/247)) `
38+
39+ ` yarn run auto-changelog update --useShortPrLink `
40+
3141#### Update the current release section of the changelog
3242
3343` yarn run auto-changelog update --rc `
3646
3747` npm run auto-changelog update --rc `
3848
49+ ### Deluxe, as used in metamask-extension
50+
51+ ` yarn run auto-changelog update --autoCategorize --useChangelogEntry --useShortPrLink --rc `
52+
3953#### Update the changelog for a renamed package
4054
4155This option is designed to be used for packages that live in a monorepo.
Original file line number Diff line number Diff line change 3030 ],
3131 "scripts" : {
3232 "build" : " ts-bridge --project tsconfig.build.json --clean" ,
33- "changelog" : " node dist/cli.js " ,
33+ "changelog" : " node dist/cli.mjs " ,
3434 "lint" : " yarn lint:eslint && yarn lint:misc --check" ,
3535 "lint:eslint" : " eslint . --cache --ext js,ts" ,
3636 "lint:fix" : " yarn lint:eslint --fix && yarn lint:misc --write" ,
Original file line number Diff line number Diff line change @@ -83,6 +83,21 @@ describe('updateChangelog', () => {
8383 expect ( result ) . toContain ( '### Added\n- New cool feature (#124)' ) ;
8484 expect ( result ) . toContain ( '### Fixed\n- Fixed a critical bug (#123)' ) ;
8585 } ) ;
86+
87+ it ( 'should have default values for useChangelogEntry and useShortPrLink' , async ( ) => {
88+ jest
89+ . spyOn ( ChangeLogUtils , 'getNewChangeEntries' )
90+ . mockResolvedValue ( getNewChangeEntriesMockData ) ;
91+
92+ const result = await ChangeLogManager . updateChangelog ( {
93+ ...changelogData ,
94+ useChangelogEntry : undefined ,
95+ useShortPrLink : undefined ,
96+ } ) ;
97+
98+ expect ( result ) . toContain ( '### Added\n- New cool feature (#124)' ) ;
99+ expect ( result ) . toContain ( '### Fixed\n- Fixed a critical bug (#123)' ) ;
100+ } ) ;
86101} ) ;
87102
88103describe ( 'getCategory' , ( ) => {
Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ export type UpdateChangelogOptions = {
9696 /**
9797 * Whether to use `CHANGELOG entry:` from the commit body and the no-changelog label
9898 */
99- useChangelogEntry : boolean ;
99+ useChangelogEntry ? : boolean ;
100100 /**
101101 * Whether to use short PR links in the changelog entries.
102102 */
103- useShortPrLink : boolean ;
103+ useShortPrLink ? : boolean ;
104104} ;
105105
106106/**
@@ -141,8 +141,8 @@ export async function updateChangelog({
141141 formatter = undefined ,
142142 packageRename,
143143 autoCategorize,
144- useChangelogEntry,
145- useShortPrLink,
144+ useChangelogEntry = false ,
145+ useShortPrLink = false ,
146146} : UpdateChangelogOptions ) : Promise < string | undefined > {
147147 const changelog = parseChangelog ( {
148148 changelogContent,
You can’t perform that action at this time.
0 commit comments