Skip to content

Commit 92b5534

Browse files
committed
fix namings and comments
1 parent 70b6bcb commit 92b5534

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app_dart/lib/src/service/firestore/unified_check_run.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ final class UnifiedCheckRun {
4343
);
4444
// We store the creation time of the guard since there might be several
4545
// guards for the same PR created and each new one created after previous
46-
// was succeeded so we are interested in a state of the last one.
46+
// was succeeded so we are interested in a state of the latest one.
4747
final creationTime = DateTime.now().toUtc().microsecondsSinceEpoch;
4848
final guard = PresubmitGuard(
4949
checkRun: checkRun,
@@ -94,8 +94,8 @@ final class UnifiedCheckRun {
9494
final transaction = await firestoreService.beginTransaction();
9595

9696
// New guard created only if previous is succeeded so failed checks might be
97-
// only in last guard.
98-
final guard = await getLastPresubmitGuardForCheckRun(
97+
// only in latest guard.
98+
final guard = await getLatestPresubmitGuardForCheckRun(
9999
firestoreService: firestoreService,
100100
slug: slug,
101101
pullRequestId: pullRequestId,
@@ -192,7 +192,7 @@ final class UnifiedCheckRun {
192192
)).firstOrNull;
193193
}
194194

195-
/// Returns the latest check for the specified github [checkRunId] and
195+
/// Returns the latest [PresubmitCheck] for the specified github [checkRunId] and
196196
/// [buildName].
197197
static Future<PresubmitCheck?> getLatestPresubmitCheck({
198198
required FirestoreService firestoreService,
@@ -210,8 +210,8 @@ final class UnifiedCheckRun {
210210
)).firstOrNull;
211211
}
212212

213-
/// Returns [PresubmitGuard]s for the specified github [checkRunId].
214-
static Future<PresubmitGuard?> getLastPresubmitGuardForCheckRun({
213+
/// Returns the latest [PresubmitGuard] for the specified github [checkRunId].
214+
static Future<PresubmitGuard?> getLatestPresubmitGuardForCheckRun({
215215
required FirestoreService firestoreService,
216216
required RepositorySlug slug,
217217
required int pullRequestId,

app_dart/test/service/firestore/unified_check_run_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ void main() {
484484
});
485485
});
486486

487-
test('getLastPresubmitGuardForCheckRun returns newest guard', () async {
487+
test('getLatestPresubmitGuardForCheckRun returns latest guard', () async {
488488
final sha = 'sha';
489489
final slug = RepositorySlug('flutter', 'flutter');
490490
final checkRun = CheckRun.fromJson(const {
@@ -527,7 +527,7 @@ void main() {
527527
], exists: false),
528528
);
529529

530-
final guard = await UnifiedCheckRun.getLastPresubmitGuardForCheckRun(
530+
final guard = await UnifiedCheckRun.getLatestPresubmitGuardForCheckRun(
531531
firestoreService: firestoreService,
532532
slug: slug,
533533
pullRequestId: 1,

0 commit comments

Comments
 (0)