Skip to content

Commit 825235b

Browse files
[tool] Rename batch change override label (flutter#12263)
(again) This was given a more descriptive lbale in flutter/packages#11835, but it appears based on failures when attempting to generate the PR that there is an undocumented length limit of 50 characters for label names, and `override: skip-batch-release-repo-check-` uses 40 of them, which causes problems when adding the package name. This renames to `override: batch-`, which is less descriptive, but should work around the length limit. Longer term, we may need to revisit having the package name in the label to avoid edge case issues with long package names.
1 parent 161d1f4 commit 825235b

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎.github/workflows/batch_release_pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
--head "${HEAD_BRANCH_NAME}" \
7171
--title "[${GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE}] Batch release" \
7272
--body "This PR was created automatically to batch release the \`${GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE}\`." \
73-
--label "override: skip-batch-release-repo-check-${GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE}"
73+
--label "override: batch-${GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE}"
7474
env:
7575
NEEDS_CREATE_BATCH_RELEASE_BRANCH_OUTPUTS_RELEASE_BRANCH: ${{ needs.create_batch_release_branch.outputs.release_branch }}
7676
GITHUB_EVENT_CLIENT_PAYLOAD_PACKAGE: ${{ github.event.client_payload.package }}

‎.github/workflows/sync_release_pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
--head "${GITHUB_REF_NAME}" \
5050
--title "Sync ${GITHUB_REF_NAME} to main" \
5151
--body "This automated PR syncs the changes from the release branch ${GITHUB_REF_NAME} back to the main branch." \
52-
--label "override: skip-batch-release-repo-check-${PACKAGE_NAME}"
52+
--label "override: batch-${PACKAGE_NAME}"

‎script/tool/lib/src/validators/version_and_changelog_validator.dart‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ class VersionAndChangelogValidator {
164164
pubspec: pubspec,
165165
ignorePlatformInterfaceBreaks: ignorePlatformInterfaceBreaks,
166166
);
167-
// PR with override: skip-batch-release-repo-check-<package> label is going to sync
168-
// changelog.md and pubspec.yaml changes back to main branch.
169-
// Proceed with regular version check.
167+
// PR with override: batch-<package> label is batching the pending
168+
// changelogs into CHANGELOG.md, so do the standard checks instead of batch
169+
// checks.
170170
final bool shouldSkipBatchReleaseRepoCheck = _prLabels.contains(
171-
'override: skip-batch-release-repo-check-${pubspec.name}',
171+
'override: batch-${pubspec.name}',
172172
);
173173
bool versionChanged;
174174

‎script/tool/test/validate_command_version_test.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ release:
15841584
);
15851585
});
15861586
test(
1587-
'ignores changelog and pubspec yaml version modifications check with override: skip-batch-release-repo-check label',
1587+
'ignores changelog and pubspec yaml version modifications check with override: batch-<package> label',
15881588
() async {
15891589
final RepositoryPackage package = createFakePackage(
15901590
'package',
@@ -1615,7 +1615,7 @@ packages/package/pubspec.yaml
16151615
final List<String> output = await runCapturingPrint(runner, <String>[
16161616
'validate',
16171617
'--base-sha=main',
1618-
'--pr-labels=override: skip-batch-release-repo-check-package',
1618+
'--pr-labels=override: batch-package',
16191619
]);
16201620

16211621
expect(

0 commit comments

Comments
 (0)