Skip to content

76026 Centralized dependabot configuration proposal#8

Open
chihaiaalex wants to merge 3 commits intomainfrom
76026-centralized-dependabot-configuration
Open

76026 Centralized dependabot configuration proposal#8
chihaiaalex wants to merge 3 commits intomainfrom
76026-centralized-dependabot-configuration

Conversation

@chihaiaalex
Copy link
Contributor

No description provided.

1. Templates (one per ecosystem: maven, gradle, pip, github-actions-only) and a repo manifest (`repos.conf`) live in a central repo (e.g. `transitdata-shared-workflows`)
2. Two triggers via GitHub Actions:
- **On merge to main**: Automatically runs the distribution to all repos
- **On PR (dry-run)**: Validates the change before merging — reports for each repo whether it can be applied cleanly, whether PRs would be needed, and flags any merge conflicts
Copy link
Contributor

@haphut haphut Mar 12, 2026

Choose a reason for hiding this comment

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

We can probably find a tool to validate the Dependabot yaml content in the CI. What other validation can we do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked into this. There's no official CLI or API for validating dependabot.yml — there's an open feature request at dependabot/dependabot-core#4605 (open since 2022).

Interestingly, dependabot/dependabot-core#4605 (comment) that GitHub ran a validation check automatically on a PR that modified dependabot.yml, but
dependabot/dependabot-core#4605 (comment) — so it might be a limited rollout or only for certain plans.

What exists today:

None of these are fully comprehensive — they validate structure against the schema but can't catch all Dependabot-internal validation rules. For our dry-run, a schema check would catch the most common errors
(typos, invalid keys, wrong types). Beyond that, the best validation is just that Dependabot itself silently ignores invalid configs — it won't break anything, it just won't run.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, JSON schema validation sounds useful and secure.

│ ├── gradle.yml
│ ├── pip.yml
│ └── github-actions-only.yml
└── repos.conf # repo-name:template mapping
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternative design: Push Dependabot to all non-archived repos owned by our team. If something breaks, create a denylist for those repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't personally see an issue with adding a single line to a file, each time we need to setup a new repository.
Is not something that we would do too often.

Copy link
Contributor

@haphut haphut Mar 24, 2026

Choose a reason for hiding this comment

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

It's one more extra thing to remember and there is no warning if one forgets it. That it does not happen often makes it easier to forget.

We can have a checklist for creating new repos. It's just nicer to automate.

As a daily cron job checking for new repos and checking for dependabot.yml and denylist changes, then pushing to all of our repos, there is nothing to remember.

Plus, breaking Dependabot configuration in some repo occasionally by accident is okay. We can fix it inside the team without it affecting other teams or customers.

This tool is made by a GitHub employee (so fairly trustworthy) and seems to fit this push-model for both Dependabot configuration and GitHub repo settings. It also allows selecting all repos of the whole team: https://github.com/marketplace/actions/bulk-github-repository-settings-sync#option-2-rules-based-configuration-settings-configyml EDIT: It also allows exceptions per repo.

Would you be onboard using that one with a GitHub app token? Thank you for describing the process of creating an app token.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion!

I looked into the tool, I think it would work quite nice and would simplify a lot the implementation.

For the per-repo customization (if needed), we'll have to define them into the central repository as well, we can't have repository level local overrides, but I think that's fine, having all configurations in one place.

Do you want me to update the proposal further including usage of this tool?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please.

Copy link
Contributor

@haphut haphut left a comment

Choose a reason for hiding this comment

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

Great starting point for discussion! Please answer the comments or modify accordingly.

@chihaiaalex
Copy link
Contributor Author

@haphut done, replied and/or adjusted for all comments.

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