import { getHistoryCommits } from './get-history-commits' ; import { getEditCommit } from './get-edit-commit' ; interface GetCommitMessageOptions { cwd ? : string ; from ? : string ; to ? : string ; edit ? : boolean | string ; } export default async function getCommitMessages ( settings ) { const { cwd , from , to , edit } = settings ; if ( edit ) { return getEditCommit ( cwd , edit ) ; } return getHistoryCommits ( { from , to } , { cwd } ) ; }