Skip to content

Commit fd28be2

Browse files
authored
Dont show warnings by default (#365)
1 parent 68ff911 commit fd28be2

12 files changed

+21
-14
lines changed

pkgs/firehose/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.12.1-wip
2+
3+
- Make the PR health output less verbose by collapsing warnings by default.
4+
15
## 0.12.0
26

37
- Make the location of the health.yaml workflow configurable.

pkgs/firehose/lib/src/health/health.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import 'changelog.dart';
1717
import 'coverage.dart';
1818
import 'license.dart';
1919

20-
const apiToolHash = '7422ff6481101765899ae37495ce667acb400589';
20+
const apiToolHash = '4377249ec08f0fa508298077eae236f24f315e19';
2121

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

511514
markdownSummary = '''
512-
<details${isWorseThanInfo ? ' open' : ''}>
515+
<details${expand ? ' open' : ''}>
513516
<summary>
514517
<strong>${check.tag}</strong> ${result.severity.emoji}
515518
</summary>
516519
517520
$markdown
518521
519-
${isWorseThanInfo ? 'This check can be disabled by tagging the PR with `skip-${result.check.displayName}-check`.' : ''}
522+
This check can be disabled by tagging the PR with `skip-${result.check.displayName}-check`.
520523
</details>
521524
522525
''';

pkgs/firehose/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: firehose
22
description: A tool to automate publishing of Pub packages from GitHub actions.
3-
version: 0.12.0
3+
version: 0.12.1-wip
44
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose
55

66
environment:

pkgs/firehose/test_data/golden/comment_breaking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Breaking changes</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_breaking_healthchanged.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Breaking changes</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_breaking_ignore_package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Breaking changes</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_coverage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Coverage</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_coverage_healthchanged.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Coverage</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_coverage_ignore_package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>Coverage</strong> :warning:
44
</summary>

pkgs/firehose/test_data/golden/comment_leaking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<details open>
1+
<details>
22
<summary>
33
<strong>API leaks</strong> :warning:
44
</summary>

0 commit comments

Comments
 (0)