Crates.io | monorepo-dependabot-config |
lib.rs | monorepo-dependabot-config |
version | 0.1.3 |
source | src |
created_at | 2024-01-12 18:51:34.833089 |
updated_at | 2024-05-06 20:15:23.701619 |
description | A tool to generate Dependabot configuration for a monorepo with multiple languages |
homepage | |
repository | |
max_upload_size | |
id | 1097955 |
size | 31,711 |
Problem: Dependabot configuration files are hard to maintain in a monorepo. It can't auto discover the different package ecosystems in the monorepo. Solution: A tool that can auto generate dependabot configuration files based on the package ecosystems in the monorepo.
Just run the monorepo-dependabot-config .
command in the root of your monorepo.
It will generate a dependabot configuration file based on the package ecosystems it finds in the monorepo.
You can also run this in CI to validate no package/project is left behind.
Install from crates.io
cargo install monorepo-dependabot-config
Build from source
After cloning the repository run:
cargo run
monorepo-dependabot-config --enable-default-rules .
Will generate all the possible dependabot rules it can find.
monorepo-dependabot-config --extra-configuration-file=extra-config.yml .
where the configuration is
# extra-config.yml
generators:
- detector:
type: DIRECOTRY_HAS_FILE_FILE_MATCHING
config:
regex: ".*.tf"
generated_block:
package-ecosystem: terraform
schedule:
interval: daily
- detector:
type: DIRECOTRY_HAS_FILE_FILE_MATCHING
config:
regex: ".*.hcl"
generated_block:
package-ecosystem: terraform
schedule:
interval: daily
We could also have some detectors detectors:
generators:
- detector:
type: HAS_FILE
config:
file_names:
match_type: ALL | ANY
generators:
- detector:
type: HAS_FILE_WITH_CONTENT_MATCHING
config:
regex: "a-regex"
The config file could have
generate:
- detector:
direcotry-has-file-file-matching:
regex: "aaa"
generated_block:
TBD