File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ export async function promptForChange(options: BeachballOptions) {
2424 const packageInfos = getPackageInfos ( cwd ) ;
2525 const packageGroups = getPackageGroups ( packageInfos , options . path , options . groups ) ;
2626
27+ // Check recent commit messages for structured conventional
28+ // commits. If present, and --useConventionalCommits is set, fetch
29+ // change type and description from the first available commit
30+ // message.
2731 const fromConventionalCommits =
2832 ( options . useConventionalCommits &&
2933 recentMessages . map ( parseConventionalCommit ) . filter ( < T > ( obj : T | undefined ) : obj is T => ! ! obj ) ) ||
@@ -71,6 +75,7 @@ export async function promptForChange(options: BeachballOptions) {
7175 } ,
7276 } ;
7377
78+ // Only include structured commit messages that map to an allowed change type.
7479 const allowedConventionalCommit = fromConventionalCommits . find ( ( c ) => ! disallowedChangeTypes ?. includes ( c . type ) ) ;
7580 const showChangeTypePrompt = ! options . type && ! allowedConventionalCommit && changeTypePrompt . choices ! . length > 1 ;
7681
You can’t perform that action at this time.
0 commit comments