Skip to content

Commit b4b2a43

Browse files
authored
Unsubmit donotsubmit (#324)
... --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback. </details>
1 parent 8749a2b commit b4b2a43

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

.github/workflows/health_base.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ jobs:
127127
if: ${{ inputs.check == 'coverage' }}
128128

129129
- name: Install firehose
130-
run: dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref=forceFlutter
131-
# DO-NOT-SUBMIT
130+
run: dart pub global activate firehose
132131
if: ${{ !inputs.local_debug }}
133132

134133
- name: Install local firehose

pkgs/quest/bin/quest.dart

+19-20
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ Future<void> main(List<String> arguments) async {
1717
var gitUri = arguments[1].replaceRange(0, 'git'.length, 'https');
1818
gitUri = gitUri.substring(0, gitUri.length - '.git'.length);
1919
final branch = arguments[2];
20-
final lines = arguments[3].split('\n');
21-
final labels = lines
22-
.sublist(1, lines.length - 1)
20+
final labels = arguments[3]
21+
.split('\n')
2322
.map((e) => e.trim())
2423
.where((line) => line.startsWith('ecosystem-test'));
2524
print('Labels: $labels');
2625
final packages = fire.Repository().locatePackages();
2726
//TODO: Possibly run for all packages, not just the first.
28-
final package = packages.firstWhereOrNull((package) =>
29-
labels.any((label) => label == 'ecosystem-test-${package.name}'));
27+
final package = packages.firstWhereOrNull(
28+
(package) =>
29+
labels.any((label) => label == 'ecosystem-test-${package.name}'),
30+
);
3031
if (package != null) {
3132
print('Found $package. Embark on a quest!');
3233
final version = '${package.name}:${json.encode({
@@ -35,25 +36,18 @@ Future<void> main(List<String> arguments) async {
3536
'ref': branch,
3637
'path':
3738
p.relative(package.directory.path, from: Directory.current.path)
38-
}
39+
},
3940
})}';
40-
final chronicles = await Quest(
41-
package.name,
42-
version,
43-
repositoriesFile,
44-
).embark();
41+
final chronicles =
42+
await Quest(package.name, version, repositoriesFile).embark();
4543
final comment = createComment(chronicles);
4644
await writeComment(comment);
4745
print(chronicles);
4846
exitCode = chronicles.success ? 0 : 1;
4947
}
5048
}
5149

52-
enum Level {
53-
solve,
54-
analyze,
55-
test;
56-
}
50+
enum Level { solve, analyze, test }
5751

5852
/// The result of embarking on a quest. Stores the [package] which was tested
5953
/// with its new [version] as well as the [chapters] of the chronicles, each
@@ -84,8 +78,10 @@ class Chapter {
8478

8579
bool get success => failure == null;
8680

87-
Level? get failure => Level.values.firstWhereOrNull((level) =>
88-
before[level]?.success == true && after[level]?.success == false);
81+
Level? get failure => Level.values.firstWhereOrNull(
82+
(level) =>
83+
before[level]?.success == true && after[level]?.success == false,
84+
);
8985

9086
String toRow(Application application) => '''
9187
| ${application.name} | ${Level.values.map((l) => '${before[l]?.success.toEmoji ?? '-'}/${after[l]?.success.toEmoji ?? '-'}').join(' | ')} |''';
@@ -179,8 +175,11 @@ class Quest {
179175
await runFlutter(['clean'], path);
180176

181177
print('Rev package:$candidatePackage to version $version $application');
182-
final revSuccess =
183-
await runFlutter(['pub', 'add', version], path, true);
178+
final revSuccess = await runFlutter(
179+
['pub', 'add', version],
180+
path,
181+
true,
182+
);
184183

185184
print('Run checks for modified package');
186185
final resultAfter = await runChecks(path, application.level);

0 commit comments

Comments
 (0)