-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dry-run: Dependabot::ConfigFile #3512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I also started on some of these primitives a while ago and wondering if we want to crib some stuff from there?
I tried to implement the config file fetcher as another file fetcher: https://github.com/dependabot/dependabot-core/compare/feelepxyz/cli-experiment?expand=1#diff-7f068f9118efc60b552a73767f52e71a60020c0690b239c292b4fc050d421782R8-R42
I also copied over the whole schema and a lot of the parsing logic which we probably don't want to get this over the line.
SGTM, I'll make this change. It's definitely a chicken/egg problem: the
I wasn't keen to bring "real" validation (e.g. the JSON schema), it seems harmless scope creep but would have the maintenance cost of requiring the schema be maintained in two places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, left a few minor comments, feel free to merge when you've folded in what makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
This introduces the
Dependabot::Config
module, starring theDependabot::Config::File
class.This PR wraps the configuration stored in
dependabot.yaml
, with helpers to locate the configuration relevant to the active ecosystem/directory.This is incomplete, only extracting the features to provide:
commit-message
options, if--pull-request
is enabledignore:
conditions, ifIGNORE_CONDITIONS
is not set (following dry-run: ignore conditions from env #3507)