Skip to content

chore: auto merge vaadin-bot cherry-pick PRs - #10382

Merged
ZheSun88 merged 1 commit into
mainfrom
feat/auto-merge-cherry-picks
Oct 9, 2026
Merged

ZheSun88 merged 1 commit into
mainfrom
feat/auto-merge-cherry-picks

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

Description

Adds .github/workflows/auto-merge.yml, which approves cherry-pick PRs and enables auto merge (squash) on them when they:

  • are open and not a draft
  • were opened by vaadin-bot
  • have CP: in the title
  • do not target main
  • have no ai-resolved-conflict label
  • have passed every check run and commit status on the head commit. PRs whose checks are still running are retried on the next run.

The rules are in scripts/autoMerge.js of vaadin/platform-build-script (AUTO_MERGE_POLICY=cherry-pick, vaadin/platform-build-script#210).

The workflow runs hourly, and can be run manually with a dry-run option. Scheduled workflows always run from main, so this one file covers PRs into every maintenance branch and does not need to be cherry-picked. PRs that already have auto merge enabled or are already approved are skipped.

Each run writes a summary table with every PR it checked and the outcome: approved with auto merge enabled, skipped (with the reason), or failed.

Secrets: VAADIN_BOT_TOKEN (reads the PRs, enables auto merge, downloads the script) and VAADIN_REVIEW_BOT (approves; must be an account other than vaadin-bot).

Testing

  • The script rules were tested with a mocked GitHub API in vaadin/platform-build-script#210.
  • The run step was tested locally with stubbed gh and node: approved, skipped and failed PRs, a title containing |, and dry run.
  • Not run on GitHub yet. After merging, a manual run with dry-run checks that the token can download the script and lists the matching PRs without approving anything.

🤖 Generated with Claude Code

Adds an hourly workflow that approves and enables auto merge for open,
non-draft cherry-pick PRs opened by vaadin-bot ("CP:" in the title, not
targeting main, no ai-resolved-conflict label) once every check and
commit status on them has passed. The rules are in autoMerge.js of
vaadin/platform-build-script. The run summary lists each PR checked and
its outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@ZheSun88
ZheSun88 enabled auto-merge October 9, 2026 06:55
@ZheSun88
ZheSun88 added this pull request to the merge queue Oct 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 9, 2026
@ZheSun88
ZheSun88 added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit cdf15f4 Oct 9, 2026
27 checks passed
@ZheSun88
ZheSun88 deleted the feat/auto-merge-cherry-picks branch October 9, 2026 08:06
ZheSun88 added a commit to vaadin/web-components that referenced this pull request Oct 9, 2026
## Description

Adds `.github/workflows/auto-merge.yml`, which approves cherry-pick PRs
and enables auto merge (squash) on them when they:
- are open and not a draft
- were opened by `vaadin-bot`
- have `CP:` in the title
- do not target `main`
- have no `ai-resolved-conflict` label
- have passed every check on the head commit. Skipped checks, such as
`claude` on bot PRs, count as passed. PRs whose checks are still running
are retried on the next run.

The rules are in `scripts/autoMerge.js` of vaadin/platform-build-script
(`AUTO_MERGE_POLICY=cherry-pick`, vaadin/platform-build-script#210). The
same workflow is added to flow-components in
vaadin/flow-components#10382.

The workflow runs hourly, and can be run manually with a `dry-run`
option. Scheduled workflows always run from `main`, so this one file
covers PRs into every maintenance branch and does not need to be
cherry-picked. PRs that already have auto merge enabled or are already
approved are skipped.

Each run writes a summary table with every PR it checked and the
outcome: approved with auto merge enabled, skipped (with the reason), or
failed.

Secrets (organization level, already available to this repository):
`VAADIN_BOT_TOKEN` (reads the PRs, enables auto merge, downloads the
script) and `VAADIN_REVIEW_BOT` (approves; must be an account other than
`vaadin-bot`).

## Testing

- The script rules were tested with a mocked GitHub API in
vaadin/platform-build-script#210.
- The run step was tested locally with stubbed `gh` and `node` in
vaadin/flow-components#10382. This file is identical apart from
`actions/checkout@v7`.
- Checked the checks on recent `vaadin-bot` cherry-pick PRs here
(#12928, #12930, #12997): all are check runs that pass or are skipped,
so they would have been approved.
- Not run on GitHub yet. After merging, a manual run with `dry-run`
checks that the token can download the script and lists the matching PRs
without approving anything.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants