match method

String? match({
  1. required CommitInfo commitInfo,
})

match is a function that apply the match logic to return the content to put in the changelog, and if no match was found the null is returned.

In addition the match function return the raw line and it is not able to clean the metadata attach to the commit body.

Implementation

String? match({required CommitInfo commitInfo}) {
  var headerMatch = _headerMatch(commitInfo: commitInfo);
  if (headerMatch == null && strict) {
    return null;
  }

  if (exactMatch != null || regex != null) {
    return _bodyMatch(commitInfo: commitInfo);
  }
  return headerMatch;
}