Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkgs/firehose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.12.1-wip

- Make the PR health output less verbose by collapsing warnings by default.

## 0.12.0

- Make the location of the health.yaml workflow configurable.
Expand Down
11 changes: 7 additions & 4 deletions pkgs/firehose/lib/src/health/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'changelog.dart';
import 'coverage.dart';
import 'license.dart';

const apiToolHash = '7422ff6481101765899ae37495ce667acb400589';
const apiToolHash = '4377249ec08f0fa508298077eae236f24f315e19';

enum Check {
license('License Headers', 'license'),
Expand Down Expand Up @@ -506,17 +506,20 @@ This check for [test coverage](https://github.com/dart-lang/ecosystem/wiki/Test-
final String markdownSummary;
if (result.markdown != null) {
var markdown = result.markdown;
var isWorseThanInfo = result.severity.index >= Severity.warning.index;
var expand = switch (result.severity) {
Severity.success || Severity.info || Severity.warning => false,
Severity.error => true,
};

markdownSummary = '''
<details${isWorseThanInfo ? ' open' : ''}>
<details${expand ? ' open' : ''}>
<summary>
<strong>${check.tag}</strong> ${result.severity.emoji}
</summary>

$markdown

${isWorseThanInfo ? 'This check can be disabled by tagging the PR with `skip-${result.check.displayName}-check`.' : ''}
This check can be disabled by tagging the PR with `skip-${result.check.displayName}-check`.
</details>

''';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/firehose/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firehose
description: A tool to automate publishing of Pub packages from GitHub actions.
version: 0.12.0
version: 0.12.1-wip
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose

environment:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/firehose/test_data/golden/comment_breaking.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Breaking changes</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Breaking changes</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Breaking changes</strong> :warning:
</summary>
Expand Down
2 changes: 1 addition & 1 deletion pkgs/firehose/test_data/golden/comment_coverage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Coverage</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Coverage</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>Coverage</strong> :warning:
</summary>
Expand Down
2 changes: 1 addition & 1 deletion pkgs/firehose/test_data/golden/comment_leaking.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>API leaks</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>API leaks</strong> :warning:
</summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<details open>
<details>
<summary>
<strong>API leaks</strong> :warning:
</summary>
Expand Down