Skip to content

fix(auto_submit): Pass requestSha to GitHub merge API#5107

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
jtmcdole:toctou-fix
Jul 17, 2026
Merged

fix(auto_submit): Pass requestSha to GitHub merge API#5107
auto-submit[bot] merged 2 commits into
flutter:mainfrom
jtmcdole:toctou-fix

Conversation

@jtmcdole

Copy link
Copy Markdown
Member

Defense in depth - prevent autosubmit from trying to land a pushed (but not approved) pr.

This is not a real issue since we have branch protection rules, but it's good to have.

Defense in depth - prevent autosubmit from trying to land a pushed (but
not approved) pr.  This is not a real issue since we have branch
protection rules, but it's good to have.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 17, 2026
@jtmcdole
jtmcdole requested a review from yjbanov July 17, 2026 18:06

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

Copy link
Copy Markdown

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 updates the validation service to require and validate the head SHA when merging a pull request directly. It also adds corresponding tests and updates the fake GitHub service to track merge SHAs. The review feedback correctly points out that when direct merging fails due to an invalid head SHA, the returned SubmitMethod should be SubmitMethod.merge instead of SubmitMethod.enqueue.

Comment thread auto_submit/lib/service/validation_service.dart
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@jtmcdole
jtmcdole requested a review from eyebrowsoffire July 17, 2026 18:14
@jtmcdole jtmcdole added the autosubmit Merge PR when tree becomes green via auto submit App. label Jul 17, 2026

@yjbanov yjbanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@auto-submit
auto-submit Bot merged commit 7ef207e into flutter:main Jul 17, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants