Skip to content

[ci] Update branch management for batch release#11575

Open
chunhtai wants to merge 5 commits intoflutter:mainfrom
chunhtai:batch-branch
Open

[ci] Update branch management for batch release#11575
chunhtai wants to merge 5 commits intoflutter:mainfrom
chunhtai:batch-branch

Conversation

@chunhtai
Copy link
Copy Markdown
Contributor

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

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-assist bot 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

  1. 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

@chunhtai chunhtai added the CICD Run CI/CD label Apr 23, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026
@chunhtai chunhtai added the CICD Run CI/CD label Apr 23, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026
@chunhtai chunhtai added the CICD Run CI/CD label Apr 23, 2026
types: [batch-release-pr]

env:
HEAD_BRANCH_NAME: ${{ github.event.client_payload.package }}-${{ github.run_id }}-${{ github.run_attempt }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is going to be used by both jobs, i move it out

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026
return errors;
}

Future<List<String>> _validateRemoteReleaseBranch(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since now the workflow creates differernt release branches, this check is obsolete

@chunhtai chunhtai marked this pull request as ready for review April 23, 2026 21:31
@chunhtai chunhtai added the CICD Run CI/CD label Apr 23, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-')) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment thread script/tool/lib/src/branches_for_batch_release_command.dart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant