Skip to content

Automate dependency monitoring and patch-level auto-merge#16

Merged
danielorbach merged 5 commits intomainfrom
init-dependabot
Mar 11, 2026
Merged

Automate dependency monitoring and patch-level auto-merge#16
danielorbach merged 5 commits intomainfrom
init-dependabot

Conversation

@danielorbach
Copy link
Collaborator

With CI in place (#15), the repository can gate dependency updates on passing checks. Dependabot now monitors both Go modules and GitHub Actions on a weekly schedule, and patch-level updates auto-merge once CI passes.

Minor and major updates still require human review. TODO comments in the automerge workflow mark where Claude-assisted review steps will slot in once the Claude Code workflow (#5) lands: approve-and-merge for minor updates, comment-only analysis for major ones. This addresses three of the four checkboxes in #6; the remaining one (LLM-assisted review) is blocked on #5.

Relates to #6

Weekly schedule with go.mod commit prefix matches the convention
established in go-digitaltwin/go-digitaltwin. No dependency groups
yet since the module has no third-party imports.
Keeps action versions (checkout, setup-go, golangci-lint, etc.)
current alongside Go module monitoring.
Patches carry minimal risk of breaking changes. Approving and
enabling auto-merge lets them land without human intervention
once the CI workflow reports success.
The automerge workflow currently handles only patches. TODO comments
mark where Claude-assisted review steps will slot in once the Claude
Code workflow (#5) is resolved: approve-and-merge for minor updates,
comment-only analysis for major updates.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Dependabot-based dependency monitoring and a GitHub Actions workflow to auto-approve/auto-merge patch-level dependency update PRs after required checks pass, building on the CI gating introduced in #15.

Changes:

  • Configure Dependabot to check Go modules and GitHub Actions weekly.
  • Add a Dependabot PR workflow that auto-approves and enables auto-merge for semver patch updates (with TODO hooks for future Claude-assisted review on minor/major updates).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/dependabot-automerge.yml Approves and enables auto-merge for Dependabot patch updates via gh CLI based on fetched metadata.
.github/dependabot.yml Enables weekly Dependabot updates for gomod and github-actions ecosystems with consistent labeling/commit prefixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@galactic-king galactic-king left a comment

Choose a reason for hiding this comment

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

@danielorbach danielorbach merged commit 898cacd into main Mar 11, 2026
9 checks passed
@danielorbach danielorbach deleted the init-dependabot branch March 11, 2026 17:44
@danielorbach danielorbach linked an issue Mar 11, 2026 that may be closed by this pull request
4 tasks
danielorbach added a commit that referenced this pull request Mar 12, 2026
The existing Dependabot workflow auto-approves and merges patch updates
but left minor and major updates for human review (see #16). This
completes the three-tier automation by replacing those TODOs with
Claude-assisted review.

Minor updates are reviewed and auto-merged if Claude approves. Major
updates receive analysis with migration notes and changelog research,
but require a human to approve and merge. Tool permissions follow a
least-privilege model: `gh pr review` commands are narrowly scoped, and
major reviews explicitly disallow approval via `--disallowedTools`. The
minor review prompt flags v0.x dependencies, where semver permits
breaking changes in minor bumps.

Review and merge are split into separate jobs so each can declare its
own least-privilege permission set: the review job holds `id-token:
write` for Claude's OIDC tokens but only `contents: read`, while the
merge job holds `contents: write` but no `id-token`. This follows the
principle of least privilege at the job level, narrowing the blast
radius of each token.

The Claude Code "app" integration for issues and PRs (originally planned
in #5) was
[dropped](#5 (comment))
in favor of the local Claude Code experience; the prior attempt is
preserved in #18.

Closes #6.
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.

Configuring Dependabot for dependency management

3 participants