Skip to content

Commit

Permalink
Merge branch 'flutter:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoamador authored Feb 27, 2024
2 parents b061e98 + a72a221 commit 34aec8a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app_dart/lib/src/request_handlers/reset_prod_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ class ResetProdTask extends ApiRequestHandler<Body> {
slug: slug,
);
final Commit commit = await _getCommitFromTask(datastore, task);
sha ??= commit.id!.split('/').last;
taskName ??= task.name;

final CiYaml ciYaml = await scheduler.getCiYaml(commit);
final Target target = ciYaml.postsubmitTargets.singleWhere((Target target) => target.value.name == task.name);
Expand Down
5 changes: 5 additions & 0 deletions app_dart/test/request_handlers/reset_prod_task_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ void main() {
config.db.values[task.key] = task;
config.db.values[commit.key] = commit;
expect(await tester.post(handler), Body.empty);

final List<dynamic> captured = verify(mockFirestoreService.getDocument(captureAny)).captured;
expect(captured.length, 1);
final String documentName = captured[0] as String;
expect(documentName, '$kDatabase/documents/$kTaskCollectionId/${commit.sha}_${task.name}_${task.attempts}');
});

test('Re-schedule existing task', () async {
Expand Down
15 changes: 12 additions & 3 deletions auto_submit/lib/service/revert_issue_body_formatter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,28 @@ class RevertIssueBodyFormatter {

// Create the body for the revert issue.
revertPrBody = '''
<!-- start_original_pr_link -->
$revertPrLink
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: $initiatingAuthor
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: $revertReason
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: $prToRevertAuthor
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: ${SetBase.setToString(prToRevertReviewers)}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
Original Description:
$prToRevertBody
<!-- end_revert_body -->
''';

return this;
Expand Down

0 comments on commit 34aec8a

Please sign in to comment.