Skip to content
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

Add CI job to auto-update pre-commit dependencies weekly #8411

Closed
wants to merge 1 commit into from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Nov 1, 2023

pre-commit provides an autoupdate command to bump dependency versions in the pre-commit configuration. Not only are our current versions all stale, with #8410 we'll want a reasonable way to update the Ruff version we are using.

Until Dependabot support is released dependabot/dependabot-core#1524, using pre-commits command is the best option.

Note pre-commit provides a service that does this, but I'm not interested in depending on it.

This job opens a new pull request with updates if there are any.

@zanieb
Copy link
Member Author

zanieb commented Nov 1, 2023

I'm not sure I can test this via dispatch until it is merged

@mkniewallner
Copy link
Contributor

You might be interested in https://github.com/renovatebot/renovate, which is another free and open-source dependency update manager that handles way more ecosystems than Dependabot (including pre-commit), and is also way more customisable (allowing for instances to group all patch dependencies into a single PR).

We use it on deptry, if you are curious (here's our configuration file, and fpgmaas/deptry#503 if you want to see a PR that updates a pre-commit dependency), and I've personally been using it quite extensively on multiple projects, so if you think this could be interesting to use on Ruff, I'd be happy to give a hand.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, defer to @zanieb on whether we want to use renovate :)

@zanieb
Copy link
Member Author

zanieb commented Nov 1, 2023

Hm... tempting. I've never used it seems like most people seem to find the ux relatively similar.

@mkniewallner if you're interested in opening a pull request adding it I'll certainly review. It'd be nice to group patch version bumps in our cargo dependencies and bumps of development dependencies.

@mkniewallner
Copy link
Contributor

Hm... tempting. I've never used it seems like most people seem to find the ux relatively similar.

@mkniewallner if you're interested in opening a pull request adding it I'll certainly review. It'd be nice to group patch version bumps in our cargo dependencies and bumps of development dependencies.

Happy to! I'll play a bit with the configuration on a fork to have a better representation of PRs that Renovate would create, and eventually open a PR over here.

@zanieb zanieb closed this Nov 7, 2023
@zanieb zanieb reopened this Mar 23, 2024
@zanieb
Copy link
Member Author

zanieb commented Mar 23, 2024

Noticing our pre-commit dependencies are way out of date and opening this to investigate them again....

@AlexWaygood
Copy link
Member

AlexWaygood commented Mar 23, 2024

FWIW I've used renovate in a few projects, and just switched typeshed over to using it. It's slightly more complex to setup than dependabot, but it's extremely configurable, and it's really useful that it can do pre-commit dependencies as well as other dependencies. I don't have any major complaints with it.

Happy to open a PR setting up the config for it on Monday so you can compare it with this!

@AlexWaygood
Copy link
Member

Happy to open a PR setting up the config for it on Monday so you can compare it with this!

Here's what the renovate config would look like:

@AlexWaygood
Copy link
Member

Closing as superseded by #10567 👍

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.

4 participants