Skip to content

Add Update Cooldown Parameters to Dependabot CLI#405

Merged
kbukum1 merged 1 commit intomainfrom
kamil/add-update-cooldown-to-cli
Mar 5, 2025
Merged

Add Update Cooldown Parameters to Dependabot CLI#405
kbukum1 merged 1 commit intomainfrom
kamil/add-update-cooldown-to-cli

Conversation

@kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Mar 5, 2025

Summary

This PR adds support for update cooldown parameters in the Dependabot CLI. The cooldown settings allow users to configure delays between dependency updates based on semantic versioning rules.

Changes Introduced

  • Added a new cooldown field to the Job struct in model/job.go, allowing users to specify cooldown settings.
  • Updated YAML unmarshaling and struct mapping to support the new cooldown parameters.
  • Enhanced test coverage in job_test.go to validate parsing of cooldown settings from YAML.
  • Ensured backward compatibility by making cooldown an optional field (omitempty).

New Cooldown Parameters

  • default-days: Default cooldown period for all updates.
  • semver-major-days: Cooldown period for major updates.
  • semver-minor-days: Cooldown period for minor updates.
  • semver-patch-days: Cooldown period for patch updates.
  • include: List of dependencies explicitly included in cooldown rules.
  • exclude: List of dependencies excluded from cooldown rules.

Why This Change?

  • Allows users to reduce update noise by spacing out dependency updates.
  • Provides fine-grained control over update schedules.
  • Helps teams better manage dependency upgrades without overwhelming PRs.

Testing Done

  • Added unit tests to job_test.go to validate cooldown parameters parsing.
  • Verified correct mapping of YAML fields to the Job struct.
  • Ran go test ./... to ensure all tests pass.

@kbukum1 kbukum1 requested a review from a team as a code owner March 5, 2025 21:36
@kbukum1 kbukum1 added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit 99bf039 Mar 5, 2025
141 of 150 checks passed
@kbukum1 kbukum1 deleted the kamil/add-update-cooldown-to-cli branch March 5, 2025 21:53
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