File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ export async function promptForChange(options: BeachballOptions): Promise<Change
2828
2929 const packageGroups = getPackageGroups ( packageInfos , options . path , options . groups ) ;
3030
31+ // Check recent commit messages for structured conventional
32+ // commits. If present, and --useConventionalCommits is set, fetch
33+ // change type and description from the first available commit
34+ // message.
3135 const fromConventionalCommits =
3236 ( options . useConventionalCommits &&
3337 recentMessages . map ( parseConventionalCommit ) . filter ( < T > ( obj : T | undefined ) : obj is T => ! ! obj ) ) ||
@@ -75,6 +79,7 @@ export async function promptForChange(options: BeachballOptions): Promise<Change
7579 } ,
7680 } ;
7781
82+ // Only include structured commit messages that map to an allowed change type.
7883 const allowedConventionalCommit = fromConventionalCommits . find ( ( c ) => ! disallowedChangeTypes ?. includes ( c . type ) ) ;
7984 const showChangeTypePrompt = ! options . type && ! allowedConventionalCommit && changeTypePrompt . choices ! . length > 1 ;
8085
You can’t perform that action at this time.
0 commit comments