Skip to content

chore(ci): add Dependabot (npm+actions) with grouped auto-merge - #1

Merged
calltelemetry-jason merged 1 commit into
mainfrom
chore/add-dependabot-automerge
Jun 1, 2026
Merged

chore(ci): add Dependabot (npm+actions) with grouped auto-merge#1
calltelemetry-jason merged 1 commit into
mainfrom
chore/add-dependabot-automerge

Conversation

@calltelemetry-jason

Copy link
Copy Markdown
Contributor

Brings cisco-ris-mcp in line with the other MCP repos' dependency automation.

Changes

  • .github/dependabot.yml (new): weekly npm + github-actions; grouped minor/patch into one rolling PR; cooldown (3-day release-age delay); majors ignored.
  • .github/workflows/dependabot-automerge.yml (new): official fetch-metadata pattern, auto-merges patch/minor Dependabot PRs after the required build check; actor+author gated to dependabot[bot], job-level perms, concurrency.

Companion settings (via API)

  • allow_auto_merge: true, branch protection on main (build), fork-PR approval → all_external_contributors, sha_pinning_required: true (workflows already pinned).

- dependabot.yml: weekly npm + github-actions updates, grouped minor/patch
  into one rolling PR, 3-day cooldown, majors ignored
- dependabot-automerge.yml: auto-merge patch/minor Dependabot PRs once the
  required 'build' check passes; actor+author gated to dependabot[bot],
  job-level least-privilege perms, per-PR concurrency
Copilot AI review requested due to automatic review settings June 1, 2026 14:59
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Chores
    • Set up automated dependency management for npm and GitHub Actions with weekly update checks.
    • Patch and minor dependency updates are consolidated; major updates require manual review.
    • New dependencies validated for 3 days before automated proposal.
    • Dependabot patch and minor pull requests are now automatically merged.

Walkthrough

This pull request establishes automated dependency management by introducing Dependabot configuration and a complementary auto-merge workflow. Dependabot is configured to check for npm and github-actions updates weekly, consolidating minor and patch updates into rolling groups while blocking major updates for manual review. A 3-day safety cooldown is applied before proposing updates. A GitHub Actions workflow auto-merges patch and minor updates via squash strategy, with concurrency controls to manage in-flight runs.

Changes

Automated dependency management setup

Layer / File(s) Summary
Dependabot update policy
.github/dependabot.yml
Configures weekly npm and github-actions update checks with minor/patch consolidation via wildcard patterns, 3-day cooldown, chore commit prefix, and ignored semver-major updates.
Auto-merge workflow
.github/workflows/dependabot-automerge.yml
GitHub Actions workflow that auto-merges Dependabot patch and minor updates with squash strategy, conditional execution for trusted dependabot[bot] actors, and PR-number-based concurrency control.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop along, dear deps, stay fresh and bright,
Weekly updates grouped just right,
Three days to settle, then merge with glee,
A rabbit's automation—smooth as can be!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding Dependabot configuration with grouped auto-merge functionality for npm and GitHub Actions dependencies.
Description check ✅ Passed The description is clearly related to the changeset, providing specific details about both new files added (dependabot.yml and dependabot-automerge.yml) and their configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-dependabot-automerge

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

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 configuration and a GitHub Actions workflow to automatically enable GitHub auto-merge for Dependabot PRs, aligning this repo’s dependency automation with the other MCP repositories.

Changes:

  • Introduces weekly Dependabot updates for npm and github-actions, grouping patch/minor updates into rolling PRs and ignoring majors.
  • Adds a workflow that enables GitHub auto-merge (squash) for Dependabot patch/minor PRs using dependabot/fetch-metadata.

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 Enables auto-merge for Dependabot patch/minor PRs via GH CLI, gated to Dependabot actor/author.
.github/dependabot.yml Configures weekly grouped Dependabot updates for npm and GitHub Actions with majors ignored.

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

# (the "build" job) pass. Gated to the trusted dependabot[bot] actor
# AND author; on: pull_request (not pull_request_target); never runs or
# trusts third-party PR code.
on: pull_request
Comment on lines +4 to +6
# The PR still only merges once branch protection's required checks
# (the "build" job) pass. Gated to the trusted dependabot[bot] actor
# AND author; on: pull_request (not pull_request_target); never runs or

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/dependabot-automerge.yml:
- Around line 8-12: Add a top-level workflow permissions block set to an empty
object to enforce least privilege (insert permissions: {} at the top-level of
the workflow), then explicitly grant only the required permissions inside the
dependabot job by adding a job-level permissions block (e.g., under the job
named "dependabot" add permissions: with the specific scopes needed such as
contents: write and pull-requests: write as appropriate) so the workflow
defaults to no privileges and the dependabot job elevates only what it actually
needs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 05721495-3313-49c4-abd1-8f0ed1ff5c5a

📥 Commits

Reviewing files that changed from the base of the PR and between 272a3e5 and 2bbdce0.

📒 Files selected for processing (2)
  • .github/dependabot.yml
  • .github/workflows/dependabot-automerge.yml

Comment on lines +8 to +12
on: pull_request

concurrency:
group: dependabot-automerge-${{ github.event.pull_request.number }}
cancel-in-progress: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Add an explicit top-level permissions: {} for least privilege.

Without a workflow-level permissions block, the default token scope applies to any future job that lacks its own block (flagged by zizmor's excessive-permissions). Setting it to empty at the top and elevating only inside the dependabot job keeps the surface minimal and documents intent (also addresses the undocumented-permissions hint at Line 21).

🔒 Proposed change
 on: pull_request
 
+# Deny by default; the dependabot job elevates only what it needs.
+permissions: {}
+
 concurrency:
   group: dependabot-automerge-${{ github.event.pull_request.number }}
   cancel-in-progress: false

And document the job-level grant:

     permissions:
+      # contents: enable auto-merge on the branch; pull-requests: act on the PR.
       contents: write
       pull-requests: write
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on: pull_request
concurrency:
group: dependabot-automerge-${{ github.event.pull_request.number }}
cancel-in-progress: false
on: pull_request
# Deny by default; the dependabot job elevates only what it needs.
permissions: {}
concurrency:
group: dependabot-automerge-${{ github.event.pull_request.number }}
cancel-in-progress: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dependabot-automerge.yml around lines 8 - 12, Add a
top-level workflow permissions block set to an empty object to enforce least
privilege (insert permissions: {} at the top-level of the workflow), then
explicitly grant only the required permissions inside the dependabot job by
adding a job-level permissions block (e.g., under the job named "dependabot" add
permissions: with the specific scopes needed such as contents: write and
pull-requests: write as appropriate) so the workflow defaults to no privileges
and the dependabot job elevates only what it actually needs.

@calltelemetry-jason

Copy link
Copy Markdown
Contributor Author

Re CodeRabbit nitpick (top-level permissions: {}): valid least-privilege suggestion, but declining here to keep this workflow byte-identical with the same file now on cisco-phone-mcp/cisco-cucm-mcp/cisco-axl-mcp/openclaw-linear-plugin. The org default workflow token is already read-only, and the job grants only contents/pull-requests: write. If we want the explicit top-level deny, it should be applied across all five repos in one sweep — tracked as a follow-up.

@calltelemetry-jason
calltelemetry-jason merged commit 1924224 into main Jun 1, 2026
4 checks passed
@calltelemetry-jason
calltelemetry-jason deleted the chore/add-dependabot-automerge branch June 1, 2026 15:05
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