Skip to content

Commit c91ff24

Browse files
xerialclaude
andcommitted
Drop Scala Steward auto-merge job
The semver-major label guard was a no-op: this repo's Scala Steward PRs only carry library-update (and sometimes internal), so the guard would have auto-merged every Scala Steward PR including major bumps. Defer Scala Steward auto-merge until the repo has proper semver labeling configured. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bc489c4 commit c91ff24

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

.github/workflows/auto-merge.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,3 @@ jobs:
2424
run: gh pr merge --squash --auto "${{ github.event.pull_request.html_url }}"
2525
env:
2626
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
28-
auto-merge-scala-steward:
29-
name: Auto-Merge Scala Steward PRs
30-
runs-on: ubuntu-latest
31-
if: ${{ github.event.pull_request.user.login == 'scala-steward' }}
32-
steps:
33-
- name: Enable auto-merge for non-major updates
34-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'semver-major') }}
35-
run: gh pr merge --squash --auto "${{ github.event.pull_request.html_url }}"
36-
env:
37-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

plans/2026-05-05-auto-merge.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,40 @@ pattern used in `wvlet/uni/.github/workflows/auto-merge.yml`.
3535

3636
## Plan
3737

38-
1. Add `.github/workflows/auto-merge.yml` with two jobs:
39-
- **auto-merge-dependabot**: triggers when `github.actor == 'dependabot[bot]'`,
40-
uses `dependabot/fetch-metadata@v3` to read the update type, and runs
38+
1. Add `.github/workflows/auto-merge.yml` with one job:
39+
- **auto-merge-dependabot**: triggers when
40+
`github.event.pull_request.user.login == 'dependabot[bot]'`, uses
41+
`dependabot/fetch-metadata@v2` to read the update type, and runs
4142
`gh pr merge --squash --auto` only when the update is **not**
4243
`version-update:semver-major`.
43-
- **auto-merge-scala-steward**: triggers when `github.actor == 'scala-steward'`
44-
and runs `gh pr merge --squash --auto` for all such PRs (Scala Steward
45-
does not surface a structured "major" signal the way Dependabot's
46-
fetch-metadata action does, so we rely on Scala Steward's own
47-
`pullRequests.allowedUpdates` config — already filtered upstream — and
48-
skip if the PR has a `semver-major` label).
4944
2. Set workflow-level `permissions` to the minimum required:
5045
`contents: write` and `pull-requests: write`.
5146
3. Use `GITHUB_TOKEN` directly via `env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}`.
5247

48+
### Scala Steward (deferred)
49+
50+
The initial draft also auto-merged Scala Steward PRs, gated on a
51+
`semver-major` label being absent. But this repo's existing Scala Steward PRs
52+
only carry `library-update` (and sometimes `internal`) — no semver labels are
53+
configured, so a `!contains(..., 'semver-major')` guard is effectively a
54+
no-op and would auto-merge every Scala Steward PR including major bumps.
55+
Codex review caught this. Rather than ship an unsafe guard, we drop the
56+
Scala Steward job from this PR. Re-adding it should be a follow-up that
57+
either:
58+
- Defines `early-semver-major`/`early-semver-minor`/`early-semver-patch`
59+
labels in the repo (Scala Steward only applies labels that already exist)
60+
and adds a `.scala-steward.conf` enabling them, then guards on
61+
`early-semver-major`.
62+
- Or uses a manual opt-in label like `auto-merge` that the maintainer adds
63+
after a quick review.
64+
5365
## Out of scope
5466

5567
- Setting up a GitHub App for elevated bot identity.
5668
- Auto-approving PRs (a human approval may still be required by branch
5769
protection — auto-merge will simply wait for it).
5870
- Changing branch protection rules.
71+
- Scala Steward auto-merge (see above).
5972

6073
## Validation
6174

0 commit comments

Comments
 (0)