stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
628 stars 311 forks source link

Add dependabot.yml for dependency version updates #1008

Closed kanwalpreetd closed 2 months ago

kanwalpreetd commented 2 months ago

What

Adding base config for dependabot.yml, which enables automatic PRs for dependency version updates through Dependabot. This base config sets version updates to run on a weekly schedule, groups PRs for version updates according to major vs minor/patch updates, and sets max PRs that Dependabot can create for version updates per package-ecosystem. But if you would like, several config options can be added to dependabot.yml as per configuration-options-for-the-dependabot.yml-file to customize version updates, such as:

Also, automatic PRs for security updates through Dependabot are enabled through a global setting. PRs for security updates will be grouped as much as possible across directories and per ecosystem through the global setting (grouping-dependabot-security-updates). But dependabot.yml can also be used for more granular security updates settings in addition to version updates (some of the options in dependabot.yml are shared across security and version updates), such as:

Why

To enable using the latest package versions, and provide a way to customize Dependabot security updates PRs.

Shaptic commented 2 months ago

Can I ask how this is different from GitHub's built-in dependabot support for this repo? See here: https://github.com/stellar/js-stellar-sdk/security/dependabot. It regularly opens PRs for upgrading problematic dependencies, e.g. https://github.com/stellar/js-stellar-sdk/pull/906.

kanwalpreetd commented 2 months ago

@Shaptic This enables Dependabot to create auto PRs for upgrading dependency versions, if newer versions are available.

Through the currently enabled Dependabot setting, Dependabot only creates PRs, such as 906, for dependencies which have an associated security alert (83).

So, this will enable auto PRs for updating all outdated dependency versions, not just the ones which have a security alert against them.