Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 43 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,50 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
directories:
- "/"

# VERSION UPDATES (scheduled)
schedule:
interval: "daily"
commit-message:
prefix: "chore(deps): "
labels:
- "dependencies"
allow:
- dependency-name: "@zetachain/networks"
- dependency-name: "@zetachain/protocol-contracts"
- dependency-name: "@zetachain/addresses"
labels: ["dependencies"]
open-pull-requests-limit: 2 # limits *version* PRs; security PRs ignore this

groups:
# 1) ZetaChain packages together
zetachain-version:
patterns:
- "@zetachain/networks"
- "@zetachain/protocol-contracts"
- "@zetachain/addresses"

# 2) Everything else in one PR (exclude ZetaChain deps to avoid overlap)
everything-else-version:
patterns:
- "*"
exclude-patterns:
- "@zetachain/networks"
- "@zetachain/protocol-contracts"
- "@zetachain/addresses"
update-types:
- "minor"
- "patch"
Comment on lines +17 to +33
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Clarify intentional asymmetry in update-types restrictions.

The zetachain-version group has no update-types restriction, allowing major updates. Meanwhile, everything-else-version restricts to minor/patch only. This asymmetry means ZetaChain packages receive major version bumps while other dependencies do not.

Please confirm this is intentional and aligns with your dependency management strategy.


I'll verify the context and intent of this configuration asymmetry.


🏁 Script executed:

#!/bin/bash
# Examine the full dependabot.yml file for context
cat .github/dependabot.yml

Length of output: 1365


🏁 Script executed:

#!/bin/bash
# Search for any documentation or comments related to dependency update strategy
rg -n -B2 -A2 "zetachain|update-types|dependency.*strateg" --type yaml --type md --type txt

Length of output: 3619


🏁 Script executed:

#!/bin/bash
# Check if there's a CONTRIBUTING or similar guide
find . -maxdepth 2 -type f \( -iname "CONTRIBUTING*" -o -iname "README*" -o -iname "DEPENDENCY*" \) | head -20

Length of output: 31


Document the rationale for asymmetric update-types policy.

The asymmetry is intentional: ZetaChain packages (@zetachain/*) are core dependencies and receive all update types (major/minor/patch), while third-party dependencies are restricted to minor/patch only. This aligns with the project's tight coupling to ZetaChain versions.

Add a clarifying comment above the zetachain-version group explaining this strategy so future maintainers understand the design decision:

      # 1) ZetaChain packages together (allow major updates—core to project)
      zetachain-version:
🤖 Prompt for AI Agents
.github/dependabot.yml lines 17-33: add a clarifying YAML comment immediately
above the `zetachain-version` group explaining the asymmetric update-types
policy; insert a single-line or block comment that says something like: "# 1)
ZetaChain packages together (allow major updates—core to project): ZetaChain
packages are core dependencies so we permit major/minor/patch updates, while
other third-party deps are limited to minor/patch." to make the rationale
explicit for future maintainers.


# SECURITY UPDATES (event-driven; schedule is ignored)
zetachain-security:
applies-to: security-updates
patterns:
- "@zetachain/networks"
- "@zetachain/protocol-contracts"
- "@zetachain/addresses"

everything-else-security:
applies-to: security-updates
patterns:
- "*"
exclude-patterns:
- "@zetachain/networks"
- "@zetachain/protocol-contracts"
- "@zetachain/addresses"
Loading