Skip to content

Commit fb69e5d

Browse files
committed
ci: drop the merge automation, leave Dependabot PRs to their owners
Deletes .github/workflows/dependabot-automerge.yaml and .github/scripts/dependabot-automerge.sh, 372 lines and an hourly cron. Unattended merging was never available: main's ruleset requires one code-owner approval with zero bypass actors, and granting some identity the right to bypass code-owner review on a public repository is not a trade worth making for dependency bumps in demo applications. What was left after that decision merged an approved pull request without a second visit — real, but not worth 372 lines and a workflow holding contents: write, when a code owner is already in the loop and one click away. So Verify Examples does what its name says and nothing more: it fails a Dependabot pull request when the examples it touches do not build and boot, and a code owner merges. Everything that carried the weight stays — the grouped config that turns 69 per-advisory pull requests into one per example app, the selector that verifies only the examples a pull request touches, the drift guard that keeps both hand-maintained lists honest, and examples-verified as the single result a reviewer reads before merging. Also cleans up the twelve comments across four files that described the merge gate as the reason for a rule, since it no longer exists: the selector's "select nothing" contract now rests on examples-verified treating a skipped job as a pass, and the drift guard's matrix-name check on the selector choosing an example whose directory is gone. Suites re-run after the removal: the drift guard's clean tree plus a covering glob, a missing applies-to, and an unclaimed spaced manifest; the selector's no-base, empty-diff and single-example paths.
1 parent b39624c commit fb69e5d

6 files changed

Lines changed: 34 additions & 409 deletions

File tree

.github/dependabot.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Dependabot configuration for the example applications.
22
#
33
# The adapter itself (Cargo.toml at the repo root) has an entry for its commit message
4-
# only. Version updates stay off and the auto-merge workflow refuses anything outside
5-
# examples/, so its dependencies are still reviewed by hand.
4+
# only. Version updates stay off, and every pull request here is reviewed and merged by
5+
# hand, so its dependencies keep the scrutiny they had.
66
#
77
# Why this file exists: without it, Dependabot opens one pull request per advisory per
88
# manifest. That produced 69 open PRs, thirteen of them against the single lockfile in
@@ -12,13 +12,12 @@
1212
# Why one entry per example rather than one glob entry per ecosystem: `directories` with
1313
# a glob plus a group produces a single pull request spanning every matching directory —
1414
# the "Bump the npm group across 17 directories with 100 updates" form, of which there
15-
# are hundreds of thousands in the wild. That would be worse here on two counts. A bad
16-
# bump in one example would block the security fixes for every other example in the
17-
# group, and .github/workflows/dependabot-automerge.yaml refuses any pull request
18-
# touching an example that .github/example-matrix.json does not build and boot — most of
19-
# them — so a cross-directory pull request would essentially never auto-merge. One entry
20-
# per example makes "one pull request per example app" a property of the config instead
21-
# of an assumption about Dependabot's grouping behavior.
15+
# are hundreds of thousands in the wild. That would be worse here: a bad bump in one
16+
# example would block the security fixes for every other example in the group, and one
17+
# red matrix job would make a pull request spanning a dozen examples unreviewable — you
18+
# could not tell which bump broke which app without reading the logs. One entry per
19+
# example makes "one pull request per example app" a property of the config instead of an
20+
# assumption about Dependabot's grouping behavior.
2221
#
2322
# Why the directories are spelled out rather than globbed: Dependabot rejects a config
2423
# whose entries for one ecosystem it cannot prove have non-overlapping directories, and
@@ -41,10 +40,10 @@
4140
# Every group is named `security` rather than after its example, because Dependabot
4241
# builds the commit header from the group name and the directory, and commitlint caps the
4342
# header at 120 characters. `fastapi-backend-only-response-streaming-pip` against its own
44-
# 53-character directory produced a 137-character header — Commit Lint red, auto-merge
45-
# refusing on "checks are not all green", and a hand amend needed for exactly the
46-
# examples with the longest names. The name only has to be unique within its entry; the
47-
# directory in the header is what distinguishes the pull requests.
43+
# 53-character directory produced a 137-character header — a red Commit Lint check and a
44+
# hand amend needed for exactly the examples with the longest names. The name only has to
45+
# be unique within its entry; the directory in the header is what distinguishes the pull
46+
# requests.
4847
version: 2
4948
updates:
5049
# bundler
@@ -588,10 +587,10 @@ updates:
588587
patterns: ["*"]
589588

590589
# cargo, the adapter itself rather than an example. Listed for the commit message
591-
# only: the limit keeps version updates off, and dependabot-automerge.sh refuses
592-
# anything touching files outside examples/, so an advisory here still gets a hand
593-
# review — it just arrives with a header Commit Lint accepts. Pre-emptive: today's six
594-
# open rust alerts are all in examples/rust-*-zip, which the entries above cover.
590+
# only: the limit keeps version updates off, and an advisory here gets the same hand
591+
# review as any other change to the adapter — it just arrives with a header Commit Lint
592+
# accepts. Pre-emptive: today's six open rust alerts are all in examples/rust-*-zip,
593+
# which the entries above cover.
595594
- package-ecosystem: cargo
596595
directories: ["/"]
597596
schedule:

.github/scripts/check-example-config.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
# examples/fastmcp and examples/sveltekit-ssr-zip are recent evidence that examples get
1717
# added regularly.
1818
#
19-
# A stale matrix name is quieter but worse: dependabot-automerge.sh treats a changed
20-
# example as covered when the matrix names it, so a renamed or deleted example would be
21-
# credited with coverage it does not have.
19+
# A stale matrix name is quieter: the selector would keep choosing an example that no
20+
# longer exists, and its job would fail on a missing working directory rather than on
21+
# anything to do with the change under review.
2222
set -euo pipefail
2323

2424
cd "$(dirname "$0")/../.."

.github/scripts/dependabot-automerge.sh

Lines changed: 0 additions & 233 deletions
This file was deleted.

.github/scripts/select-examples.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# clone does not have, or a change to a shared input every example is built against.
1414
# verify the examples in the diff — the normal pull request case.
1515
# verify nothing — the diff is empty, or touches nothing under examples/. The
16-
# `if: ... != '[]'` guards in examples.yaml skip the test jobs, and the auto-merge
17-
# gate refuses a run in which the changed example's own job did not succeed.
16+
# `if: ... != '[]'` guards in examples.yaml skip the test jobs, and examples-verified
17+
# treats a skipped job as a pass, so the workflow is green with nothing to run.
1818
#
1919
# The diff base comes from the merge ref's first parent, not from BASE_SHA, for the
2020
# reason recorded below.
@@ -75,10 +75,9 @@ echo "$changed" | sed 's/^/ /'
7575
# Shared inputs every example is built against: the adapter itself, the layer wrapper,
7676
# this workflow, and the two scripts every test job actually runs.
7777
#
78-
# Named individually rather than as .github/scripts/, which now also holds
79-
# dependabot-automerge.sh and check-example-config.sh — neither of which any example is
80-
# built against, and matching the whole directory meant a one-line fix to the auto-merge
81-
# script rebuilt and booted all eighteen entries.
78+
# Named individually rather than as .github/scripts/, which also holds
79+
# check-example-config.sh — which no example is built against, so matching the whole
80+
# directory would rebuild and boot all eighteen entries for a change to it.
8281
if grep -qE '^(src/|layer/|Cargo\.toml$|Cargo\.lock$|\.github/workflows/examples\.yaml$|\.github/scripts/verify-http\.sh$|\.github/scripts/select-examples\.sh$|\.github/example-matrix\.json$)' <<<"$changed"; then
8382
echo "A shared path changed: verifying every example."
8483
emit_all
@@ -92,9 +91,8 @@ example_paths="$(grep -oE '^examples/[^/]+' <<<"$changed" || true)"
9291

9392
# Reachable with an empty diff: a stale pull request whose change already landed
9493
# through a duplicate (#804 and #811 carry an identical update set), or a re-run after
95-
# the commit merged. "Select nothing" is the documented contract here, not "fail" —
96-
# the `if: ... != '[]'` guards in examples.yaml skip the test jobs, and the auto-merge
97-
# workflow refuses a run with no successful test job.
94+
# the commit merged. "Select nothing" is the documented contract here, not "fail" — the
95+
# `if: ... != '[]'` guards in examples.yaml skip the test jobs and the workflow is green.
9896
if [[ -z "$example_paths" ]]; then
9997
echo "No example changed: nothing to verify."
10098
for kind in image zip stream; do

0 commit comments

Comments
 (0)