pre-commit-ci / issues

public issues for https://pre-commit.ci
16 stars 3 forks source link

[FR] Autoupdate skips #140

Closed webknjaz closed 1 year ago

webknjaz commented 1 year ago

Hi, I've got a use-case where I'd like the autoupdate feature to skip updating a specific repo that is duplicated with different version. I use WPS flake8 plugin that doesn't yet have a release supporting flake8 v5 and it's quite strict about its dependencies (flake8 < 5). So I have two entries: flake8 v4 + WPS and flake8 v5 + all the other plugins.

The bot sends me PRs updating both entries to the latest repo tag but that's undesired since it'll never work w/o also updating WPS. These update PRs are just guaranteed to fail effectively wasting pre-commit.ci resources for no good reason.

Here's an example of such a PR: https://github.com/ansible-community/ansible-test-gh-action/pull/23. I've marked the place where the change is not desired with a comment.

I'd like to be able to tell it not to touch a specific entry (ignoring all the entries with the repo would work too).

asottile commented 1 year ago

dupe #83

webknjaz commented 1 year ago

dupe #83

Got it. But for the case when something is known to be broken, have you considered providing an escape hatch? For example, a flake8 plugin doesn't work with the last version (doesn't get installed because of the dep tree conflicts) and the user knows about it. And it is known that this plugin is in progress of adding support for that newer flake8. How about allowing to ignore that for like a quarter? That'd allow keeping the autoupdate at the weekly schedule. It'd look like a comment # skip-updates-until: 2022-02-20. And to prevent abuse (as in setting year 9999), pre-commit could ignore any dates further than 3 months in the future.

asottile commented 1 year ago

https://github.com/pre-commit-ci/issues/issues/83#issuecomment-946140388