revert tool changes
diff --git a/script/tool/lib/src/validators/version_and_changelog_validator.dart b/script/tool/lib/src/validators/version_and_changelog_validator.dart index 35d234a..58e79a1 100644 --- a/script/tool/lib/src/validators/version_and_changelog_validator.dart +++ b/script/tool/lib/src/validators/version_and_changelog_validator.dart
@@ -108,10 +108,6 @@ /// PR that would normally require one. static const String _missingChangelogChangeOverrideLabel = 'override: no changelog needed'; - /// The label that must be on a PR to allow editing a CHANGELOG.md file for a - /// package that uses batch release (disallows direct CHANGELOG.md edits). - static const String _changelogEditOverrideLabel = 'override: allow changelog edit'; - /// Validates that the version and changelog of a package are consistent, /// and match the policy for the files changed, returning a list of resulting /// error strings. @@ -623,26 +619,17 @@ // The changelog.md and pubspec.yaml's version should not be updated directly. if (changedFilesInPackage.contains('$relativePackagePath/CHANGELOG.md')) { - if (_prLabels.contains(_changelogEditOverrideLabel)) { - _logWarning( - 'Allowing CHANGELOG.md update due to the ' - '"$_changelogEditOverrideLabel" label.', - ); - } else { - printError( - 'This package uses batch release, so CHANGELOG.md should not be changed directly.\n' - 'Instead, create a pending changelog file in pending_changelogs folder.\n' - 'See https://github.com/flutter/flutter/blob/main/docs/ecosystem/contributing/README.md#batched-release.', - ); - errors.add('CHANGELOG.md changed'); - } + printError( + 'This package uses batch release, so CHANGELOG.md should not be changed directly.\n' + 'Instead, create a pending changelog file in pending_changelogs folder.', + ); + errors.add('CHANGELOG.md changed'); } if (changedFilesInPackage.contains('$relativePackagePath/pubspec.yaml')) { if (versionState != _CurrentVersionState.unchanged) { printError( 'This package uses batch release, so the version in pubspec.yaml should not be changed directly.\n' - 'Instead, create a pending changelog file in pending_changelogs folder.\n' - 'See https://github.com/flutter/flutter/blob/main/docs/ecosystem/contributing/README.md#batched-release.', + 'Instead, create a pending changelog file in pending_changelogs folder.', ); errors.add('pubspec.yaml version changed'); }
diff --git a/script/tool/test/validate_command_version_test.dart b/script/tool/test/validate_command_version_test.dart index 0bcea19..7084d8e 100644 --- a/script/tool/test/validate_command_version_test.dart +++ b/script/tool/test/validate_command_version_test.dart
@@ -1674,54 +1674,6 @@ ); }); - test( - 'ignores changelog modifications check with override: allow changelog edit label', - () async { - final RepositoryPackage package = createFakePackage( - 'package', - packagesDir, - version: '1.0.0', - ); - package.ciConfigFile.writeAsStringSync(''' -release: - batch: true -'''); - // Create the pending_changelogs directory so the test doesn't fail on that check. - package.directory.childDirectory('pending_changelogs').createSync(); - - gitProcessRunner.mockProcessesForExecutable['git-diff'] = <FakeProcessInfo>[ - FakeProcessInfo( - MockProcess( - stdout: ''' -packages/package/CHANGELOG.md -''', - ), - ), - ]; - gitProcessRunner.mockProcessesForExecutable['git-show'] = <FakeProcessInfo>[ - FakeProcessInfo(MockProcess(stdout: 'version: 1.0.0')), - ]; - - final List<String> output = await runCapturingPrint(runner, <String>[ - 'validate', - '--base-sha=main', - '--pr-labels=override: allow changelog edit', - ]); - - expect( - output, - containsAllInOrder(<Matcher>[ - contains('Running for package'), - contains( - 'Allowing CHANGELOG.md update due to the ' - '"override: allow changelog edit" label.', - ), - contains('(1 with warnings)'), - ]), - ); - }, - ); - test('fails when there is pubspec version modifications', () async { final RepositoryPackage package = createFakePackage( 'package',