Skip to content
Open
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
1 change: 0 additions & 1 deletion app_dart/lib/src/service/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ interface class Config extends DynamicallyUpdatedConfig {
/// These accounts should not need reviews before merging. See
/// https://github.com/flutter/flutter/blob/master/docs/infra/Autorollers.md
Set<String> get rollerAccounts => const <String>{
'skia-flutter-autoroll',
'engine-flutter-autoroll',
'dependabot',
'dependabot[bot]',
Expand Down
9 changes: 0 additions & 9 deletions app_dart/lib/src/service/pull_request_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,6 @@ class PullRequestManager {
List<PullRequestFile> files,
RepositorySlug slug,
) async {
if (pr.user!.login == 'engine-flutter-autoroll') {
return false;
}

final labels = <String>{};
var hasTests = false;
var needsTests = false;
Expand Down Expand Up @@ -684,11 +680,6 @@ class PullRequestManager {
List<PullRequestFile> files,
RepositorySlug slug,
) async {
// Do not apply the test labels for the autoroller accounts.
if (pr.user!.login == 'skia-flutter-autoroll') {
return false;
}

var hasTests = false;
Comment thread
Piinks marked this conversation as resolved.
Resolved
var needsTests = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ void main() {
missingTestsPullRequestMessageValue: 'missingTestPullRequestMessage',
releaseBranchPullRequestMessageValue: 'releaseBranchPullRequestMessage',
rollerAccountsValue: const <String>{
'skia-flutter-autoroll',
'engine-flutter-autoroll',
'dependabot',
'dependabot[bot]',
Expand Down Expand Up @@ -900,7 +899,6 @@ void main() {
'Auto-roller accounts label Framework PR with CICD label, but no comment',
() {
final inputs = <String>{
'skia-flutter-autoroll',
'dependabot',
'engine-flutter-autoroll',
'flutter-pub-roller-bot',
Expand Down Expand Up @@ -1803,48 +1801,6 @@ void foo() {
},
);

test(
'Engine does not label PR for no tests if author is skia-flutter-autoroll',
() async {
const issueNumber = 123;

tester.message = generateGithubWebhookMessage(
action: 'opened',
number: issueNumber,
slug: Config.flutterSlug,
login: 'skia-flutter-autoroll',
);

when(
pullRequestsService.listFiles(Config.flutterSlug, issueNumber),
).thenAnswer(
(_) => Stream<PullRequestFile>.value(
PullRequestFile()
..filename =
'engine/src/flutter/shell/platform/darwin/ios/framework/Source/boost.mm',
),
);

when(
issuesService.listCommentsByIssue(Config.flutterSlug, issueNumber),
).thenAnswer(
(_) => Stream<IssueComment>.value(
IssueComment()..body = 'some other comment',
),
);

await tester.post(webhook);

verifyNever(
issuesService.createComment(
Config.flutterSlug,
issueNumber,
argThat(contains(config.missingTestsPullRequestMessageValue)),
),
);
},
);

test('Engine labels PRs, no comment if DEPS-only', () async {
const issueNumber = 123;

Expand Down
2 changes: 0 additions & 2 deletions auto_submit/lib/service/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,11 @@ class Config {
/// These accounts should not need reviews before merging. See
/// https://github.com/flutter/flutter/blob/master/docs/infra/Autorollers.md
Set<String> get rollerAccounts => const <String>{
'skia-flutter-autoroll',
'engine-flutter-autoroll',
// REST API returns dependabot[bot] as author while GraphQL returns dependabot. We need
// both as we use graphQL to merge the PR and REST API to approve the PR.
'dependabot[bot]',
'dependabot',
'DartDevtoolWorkflowBot',
'flutter-pub-roller-bot',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const String sampleConfigNoOverride = '''
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -20,7 +19,6 @@ const String sampleConfigWithOverride = '''
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -57,7 +56,7 @@ void main() {
expect(repositoryConfiguration.allowConfigOverride, isFalse);
expect(repositoryConfiguration.defaultBranch, 'main');
expect(repositoryConfiguration.autoApprovalAccounts.isNotEmpty, isTrue);
expect(repositoryConfiguration.autoApprovalAccounts.length, 3);
expect(repositoryConfiguration.autoApprovalAccounts.length, 2);
expect(repositoryConfiguration.approvingReviews, 2);
expect(repositoryConfiguration.approvalGroup, 'flutter-hackers');
expect(repositoryConfiguration.runCi, isTrue);
Expand Down Expand Up @@ -90,7 +89,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -103,7 +101,7 @@ void main() {
expect(repositoryConfiguration.allowConfigOverride, isFalse);
expect(repositoryConfiguration.defaultBranch, 'main');
expect(repositoryConfiguration.autoApprovalAccounts.isNotEmpty, isTrue);
expect(repositoryConfiguration.autoApprovalAccounts.length, 3);
expect(repositoryConfiguration.autoApprovalAccounts.length, 2);
expect(repositoryConfiguration.approvingReviews, 2);
expect(repositoryConfiguration.approvalGroup, 'flutter-hackers');
expect(repositoryConfiguration.runCi, isTrue);
Expand All @@ -115,7 +113,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -129,7 +126,7 @@ void main() {
expect(repositoryConfiguration.allowConfigOverride, isFalse);
expect(repositoryConfiguration.defaultBranch, 'master');
expect(repositoryConfiguration.autoApprovalAccounts.isNotEmpty, isTrue);
expect(repositoryConfiguration.autoApprovalAccounts.length, 3);
expect(repositoryConfiguration.autoApprovalAccounts.length, 2);
expect(repositoryConfiguration.approvingReviews, 2);
expect(repositoryConfiguration.approvalGroup, 'flutter-hackers');
expect(repositoryConfiguration.runCi, isTrue);
Expand All @@ -141,7 +138,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -158,7 +154,7 @@ void main() {
expect(repositoryConfiguration.allowConfigOverride, isFalse);
expect(repositoryConfiguration.defaultBranch, 'main');
expect(repositoryConfiguration.autoApprovalAccounts.isNotEmpty, isTrue);
expect(repositoryConfiguration.autoApprovalAccounts.length, 3);
expect(repositoryConfiguration.autoApprovalAccounts.length, 2);
expect(repositoryConfiguration.approvingReviews, 2);
expect(repositoryConfiguration.approvalGroup, 'flutter-hackers');
expect(repositoryConfiguration.runCi, isTrue);
Expand Down Expand Up @@ -190,7 +186,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand All @@ -211,7 +206,7 @@ void main() {
);
expect(mergedRepositoryConfiguration.defaultBranch, 'main');
expect(mergedRepositoryConfiguration.allowConfigOverride, isTrue);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 3);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 2);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'dependabot[bot]',
Expand All @@ -224,12 +219,6 @@ void main() {
),
isTrue,
);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'DartDevtoolWorkflowBot',
),
isTrue,
);
expect(mergedRepositoryConfiguration.approvingReviews, 2);
expect(mergedRepositoryConfiguration.runCi, isTrue);
expect(
Expand Down Expand Up @@ -266,7 +255,7 @@ void main() {
globalRepositoryConfiguration,
localRepositoryConfiguration,
);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 4);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 3);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'dependabot[bot]',
Expand All @@ -279,12 +268,6 @@ void main() {
),
isTrue,
);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'DartDevtoolWorkflowBot',
),
isTrue,
);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
expectedAddedApprovalAccount,
Expand All @@ -294,7 +277,7 @@ void main() {
});

test('Duplicate auto approval account is not added', () {
const expectedAddedApprovalAccount = 'DartDevtoolWorkflowBot';
const expectedAddedApprovalAccount = 'dependabot';
const localAutoApprovalAccounts = <String>{expectedAddedApprovalAccount};
final localRepositoryConfiguration = RepositoryConfiguration(
autoApprovalAccounts: localAutoApprovalAccounts,
Expand All @@ -307,7 +290,7 @@ void main() {
globalRepositoryConfiguration,
localRepositoryConfiguration,
);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 3);
expect(mergedRepositoryConfiguration.autoApprovalAccounts.length, 2);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'dependabot[bot]',
Expand All @@ -320,12 +303,6 @@ void main() {
),
isTrue,
);
expect(
mergedRepositoryConfiguration.autoApprovalAccounts.contains(
'DartDevtoolWorkflowBot',
),
isTrue,
);
});

test('Approving reviews is overridden by local config', () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: flutter-hackers
run_ci: true
Expand Down
1 change: 0 additions & 1 deletion auto_submit/test/src/service/fake_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class FakeConfig extends Config {
Set<String> get rollerAccounts =>
rollerAccountsValue ??
const <String>{
'skia-flutter-autoroll',
'engine-flutter-autoroll',
'dependabot[bot]',
'dependabot',
Expand Down
1 change: 0 additions & 1 deletion auto_submit/test/validations/approval_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ void main() {
auto_approval_accounts:
- dependabot[bot]
- dependabot
- DartDevtoolWorkflowBot
approving_reviews: 2
approval_group: custom-group
run_ci: true
Expand Down
4 changes: 2 additions & 2 deletions auto_submit/test/validations/ci_successful_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void main() {
repositoryStatusesWithGoldMock,
);
const allSuccess = true;
final author = Author(login: 'skia-flutter-autoroll');
final author = Author(login: 'engine-flutter-autoroll');
Comment thread
Piinks marked this conversation as resolved.
Resolved
slug = github.RepositorySlug('flutter', 'flutter');

final labelNames = <String>[];
Expand Down Expand Up @@ -491,7 +491,7 @@ void main() {
repositoryStatusesWithFailedGoldMock,
);
const allSuccess = true;
final author = Author(login: 'skia-flutter-autoroll');
final author = Author(login: 'engine-flutter-autoroll');
slug = github.RepositorySlug('flutter', 'flutter');

final labelNames = <String>[];
Expand Down
Loading