fix an issue rendering multi-line changelogs (#171)
diff --git a/pkgs/firehose/CHANGELOG.md b/pkgs/firehose/CHANGELOG.md
index 71004e3..2b2ccb4 100644
--- a/pkgs/firehose/CHANGELOG.md
+++ b/pkgs/firehose/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.3.29
+
+- Fix an issue rendering longer changelogs (#170).
+
## 0.3.28
- Fix [#156](https://github.com/dart-lang/ecosystem/issues/156).
diff --git a/pkgs/firehose/lib/src/changelog.dart b/pkgs/firehose/lib/src/changelog.dart
index 8d14ad2..59b4965 100644
--- a/pkgs/firehose/lib/src/changelog.dart
+++ b/pkgs/firehose/lib/src/changelog.dart
@@ -85,7 +85,7 @@
return sections;
}
- String get describeLatestChanges => latestChangeEntries.join();
+ String get describeLatestChanges => latestChangeEntries.join('\n');
}
class _Section {
diff --git a/pkgs/firehose/pubspec.yaml b/pkgs/firehose/pubspec.yaml
index 18097bf..1150a37 100644
--- a/pkgs/firehose/pubspec.yaml
+++ b/pkgs/firehose/pubspec.yaml
@@ -1,6 +1,6 @@
name: firehose
description: A tool to automate publishing of Pub packages from GitHub actions.
-version: 0.3.28
+version: 0.3.29
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose
environment:
@@ -20,5 +20,5 @@
yaml: ^3.1.0
dev_dependencies:
- dart_flutter_team_lints: ^1.0.0
+ dart_flutter_team_lints: ^2.0.0
test: ^1.21.0
diff --git a/pkgs/firehose/test/changelog_test.dart b/pkgs/firehose/test/changelog_test.dart
index 44cae00..d22020d 100644
--- a/pkgs/firehose/test/changelog_test.dart
+++ b/pkgs/firehose/test/changelog_test.dart
@@ -132,6 +132,16 @@
});
});
+ test('describeLatestChanges', () {
+ withChangelog(_multiLineContents, (file) {
+ var changelog = Changelog(file);
+ var description = changelog.describeLatestChanges;
+ expect(description, '''
+- Fix issue 1.
+- Fix issue 2.''');
+ });
+ });
+
test('no recent entries', () {
withChangelog('''
## 0.2.0-dev
@@ -169,3 +179,14 @@
- Provide feedback about publishing status as PR comments.
''';
+
+const _multiLineContents = '''
+## 0.3.6
+
+- Fix issue 1.
+- Fix issue 2.
+
+## 0.3.5
+
+- Provide feedback about publishing status as PR comments.
+''';