changelogEntry method

String changelogEntry()

The changelog entry for this release.

Implementation

String changelogEntry() {
  final lines = [
    for (final commit in commits.where((c) => c.breaking))
      commit.changelogLine,
    for (final commit in commits.where((c) => !c.breaking && c.isNotable))
      commit.changelogLine,
    for (final MapEntry(key: name, value: constraint)
        in constraintUpdates.entries)
      '- Chore: Update $name to $constraint',
  ];
  if (lines.isEmpty) {
    lines.add('- Chore: Release without notable changes');
  }
  return '## $to\n\n${lines.join('\n')}\n';
}