Skip to content

Enable Dependabot auto-merge (config + caller workflow)#103

Open
bbkrr wants to merge 6 commits into
developfrom
chore/dependabot-automerge
Open

Enable Dependabot auto-merge (config + caller workflow)#103
bbkrr wants to merge 6 commits into
developfrom
chore/dependabot-automerge

Conversation

@bbkrr

@bbkrr bbkrr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Enable Dependabot auto-merge on Causing:

  • .github/dependabot.ymlpip (repo uses setup.py) + github-actions, weekly, target-branch: develop, dependencies label, same cooldown as RealRate-Private.
  • .github/workflows/dependabot-automerge.yaml — a thin caller of the org reusable workflow (uses: realrate/.github/.github/workflows/dependabot-automerge.yaml@main, secrets: inherit).

Why

Causing already has a dependabot-automerge ruleset whose "require workflows to pass" rule points at the path .github/workflows/dependabot-automerge.yaml. But the repo had no workflow file at that path and no dependabot.yml, so:

  • no Dependabot PRs were ever opened, and
  • if one were, the required check would never be produced → permanently blocked.

Adding the caller at that path produces the required check and runs the approve + auto-merge logic (patch/minor); major bumps get needs-manual-review.

Dependency / merge order

The caller references the reusable workflow added in realrate/.github#1 — merge that first so @main resolves at runtime.

Caveat

Whether a reusable-workflow caller run satisfies a path-based required-workflow ruleset rule is not verifiable until a live Dependabot PR runs. If the required check doesn't post, the fallback is to replace this caller with a self-contained copy of the workflow body (identical to RealRate-Private's).

Part of realrate/RealRate-Private#2148.

bbkrr and others added 4 commits July 1, 2026 11:38
Add .github/dependabot.yml (pip for setup.py + github-actions, weekly,
target develop) and a thin caller of the org reusable auto-merge
workflow at .github/workflows/dependabot-automerge.yaml.

The repo's dependabot-automerge ruleset already requires a workflow at
that path; without a local workflow file the required check was never
produced, so Dependabot PRs would be blocked. This adds it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
github-actions (and docker) ecosystems only support cooldown.default-days,
not the semver-*-days keys. Keep default-days; remove the unsupported
semver-specific cooldown so Dependabot accepts the config.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review feedback: add a job-level 'if: github.actor == dependabot[bot]'
guard so inherited secrets are never passed to the reusable workflow for
non-Dependabot (incl. fork) PRs, and restrict the pull_request_target
trigger to the default branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address re-review: github.actor is the user who triggered the event and
can be a maintainer on a rebase/synchronize of the Dependabot branch,
which would wrongly skip the job (and leave the ruleset-required check in
a non-passing state). Guard on github.event.pull_request.user.login,
which can't be forged, so secrets stay away from non-Dependabot/fork PRs
while the job still runs for every Dependabot-authored PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bbkrr and others added 2 commits July 1, 2026 14:40
The org dependabot-automerge ruleset injects .github's Dependabot
Auto-Merge workflow into every repo's PRs (required workflows can't be
reusable, so per-repo callers are both unnecessary and invalid). Keep
only dependabot.yml here; the auto-merge logic is provided org-wide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The current head was pushed while the org 'require workflows to pass'
rule was temporarily disabled, so the required Dependabot Auto-Merge
workflow never ran on it. An empty commit fires a fresh synchronize so
the injected workflow runs and skips (non-Dependabot PR), satisfying the
required check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bbkrr bbkrr enabled auto-merge (rebase) July 3, 2026 11:14
@bbkrr bbkrr disabled auto-merge July 3, 2026 11:14
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.

1 participant