-
Notifications
You must be signed in to change notification settings - Fork 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
Support pre-commit #1524
Comments
@hugovk You say this is a duplicate of https://github.com/dependabot/feedback/issues/839, but in that ticket, you also say that it is a duplicate of this one. Which one is the source of truth? |
This comment was marked as off-topic.
This comment was marked as off-topic.
As mentioned in #2040 already, this issue isn't exactly the same as #2040. This one here is about getting support for pre-commit hook/repos version updates (similar to While #2040 is asking for |
Any news on this? |
@BeyondEvil The pre-commit updates can be achieved via https://pre-commit.ci/ |
Thanks @nijel! I guess I can try to sync so dependabot and pre-commit runs the same time. |
Currently not on our roadmap. I'd suggest (for now at least) setting up an action (or any other CI job really) that runs after Dependabot that does any of this linting. We may revisit this in the future, but that's my best suggestion. PS: If you decide to go this route, you may want to configure that action/ci job to commit using the |
Sad to hear that you don't work on this. Here is a work-around: https://browniebroke.com/blog/gh-action-pre-commit-autoupdate/ |
@jurre we're coming up on the two-year anniversary since your update and passed 3 years since this was first filed. Is this on the current roadmap or should everyone just use external tools for pre-commit dependency management? Thanks! |
What's the current status of this issue? It would be amazing to have Dependabot support pre-commit configurations, as an alternative to pre-commit.ci. |
Apart from autofix_commit_msg we use all the defaults (esp. autofix_prs=true) for now. I think we can live with the default autofix_commit_msg as well. So make our life easier and remove the config. pre-commit.ci doesn't need any config in .pre-commit-config.yaml to work. We activate it by * go to https://pre-commit.ci/ * choose "Sign in with Github" (https://results.pre-commit.ci/login/github) * choose "add an installation" (1st time setup) or "manage repos on github" * activate for some or all repos To re-iterate why we use pre-commit.ci: * Actually we only wanted a way to autoupdate hooks automatically (like running 'pre-commit autoupdate'). Github's dependabot doesn't do this (dependabot/dependabot-core#1524). * We did not know/care about the fact that pre-commit.ci's main goal is to actually format PRs. We like to test this, so we keep the default config (autofix_prs=true).
It would be of great help to have this. Are there any plans to implement it? |
Remove ruff dep from pyproject.toml, since that will be installed * by pre-commit anyway locally if used * in CI where it is used to run lint and format checks Now we make sure that we install the pre-commit ruff version in CI to have one source of truth for the version. Hopefully dependabot will support .pre-commit-config.yaml (dependabot/dependabot-core#1524) some day. For now we use pre-commit.ci or manual pre-commit autoupdate.
Remove ruff dep from pyproject.toml, since that will be installed * by pre-commit anyway locally if used * in CI where it is used to run lint and format checks Now we make sure that we install the pre-commit ruff version in CI to have one source of truth for the version. Hopefully dependabot will support .pre-commit-config.yaml (dependabot/dependabot-core#1524) some day. For now we use pre-commit.ci or manual pre-commit autoupdate.
side note that Renovate does have (experimental, but very functional) support for pre-commit: It would be nice if dependabot supported it as well, especially for cases where a tool has both a pre-commit hook and a version in some versioned thing that dependabot does support. |
align with [python-typed-template](https://github.com/tekumara/python-typed-template/tree/518252bdc6eaa21043b929e074a03c1da6126db2) ruff is now installed into the venv rather than as a pre-commit hook, reversing #443 and reintroducing knowledge of .venv into .pre-commit-config.yaml. This is advantageous until [Dependabot supports updating pre-commit hooks](dependabot/dependabot-core#1524) and also means `ruff check .` can be run locally. toast: install hooks during install step so they are cached
First off thank you for Dependabot! I am using it in several repos and am very happy with the results.
I use pre-commit in my CI to run various hooks for linting files. A typical
.pre-commit-config.yaml
file might look like:While there are hooks for multiple languages, pre-commit itself is written in Python. Could Dependabot's Python support be updated to include pre-commit? The CLI already has an
autoupdate
command to update versions in the config file. Individual hooks can be updated with the--repo
flag.The text was updated successfully, but these errors were encountered: