[ci] Update branch management for batch release#11575
[ci] Update branch management for batch release#11575chunhtai wants to merge 5 commits intoflutter:mainfrom
Conversation
| types: [batch-release-pr] | ||
|
|
||
| env: | ||
| HEAD_BRANCH_NAME: ${{ github.event.client_payload.package }}-${{ github.run_id }}-${{ github.run_attempt }} |
There was a problem hiding this comment.
since it is going to be used by both jobs, i move it out
| return errors; | ||
| } | ||
|
|
||
| Future<List<String>> _validateRemoteReleaseBranch( |
There was a problem hiding this comment.
since now the workflow creates differernt release branches, this check is obsolete
There was a problem hiding this comment.
Code Review
This pull request renames the branch-for-batch-release command to branches-for-batch-release and updates the release branch naming convention to include the package version. It introduces logic to create and push these versioned branches and updates the publish and repo-package-info-check commands accordingly. Review feedback indicates that the startsWith branch matching logic may be too broad for packages with overlapping names and suggests using git branch -f to handle existing local branches more robustly.
| // Example: branch "release-go_router" matches package "go_router". | ||
| if (!isBatchReleasePackage || | ||
| batchReleaseBranchName != 'release-$packageName') { | ||
| !batchReleaseBranchName.startsWith('release-$packageName-')) { |
There was a problem hiding this comment.
The startsWith check is potentially too broad. If a package name is a prefix of another (e.g., pkg and pkg-foo), a release branch for pkg-foo (e.g., release-pkg-foo-1.0.0) would match the startsWith('release-pkg-') check for the pkg package.
While the tool currently limits processing to a single package per run, using an exact match including the version would be more robust and prevent accidental multi-package publishing if the tool's constraints change in the future.
based on go/batch-release-branch option 2
Needs to add flutter github bot to be able to bypass branch protection first
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2