You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for your work developing pre-commit/pre-commit-ci.
I was wondering if there is any way to configure the autoupdating function of pre-commit-ci to also respect the autofix_PRs: false setting, such that if an autoupdate includes a hook bump that introduces new formatting rules, that formatting is not applied automatically as part of the PR which updates the hook. We experienced this with the black update recently, see: https://github.com/neurobagel/api/pull/278/files for example (we do not want the autoupdate to touch non pre-commit-config.yaml files automatically).
The text was updated successfully, but these errors were encountered:
alyssadai
changed the title
autoupdate makes formatting changes in update PRs when autofix_PRs: Falseautoupdate makes formatting changes in update PRs when autofix_PRs: falseFeb 28, 2024
the auto update prs will always include the auto fixes if available
is there an actual reason you don't want this to happen? the setting is only intended for curmudgeony-avoiding-needing-pulls for user feature branches and really is not recommended at all
Mainly for consistency with the behavior on the rest of our non-autoupdate PRs, which respect that setting. Generally, we've set autofix: False to avoid merge conflicts for multiple contributors working on the same PR. While this should be less of an issue for autoupdate PRs alone, if the auto-reformatted code includes sections being worked on in other open PRs (which are not autofixed by default), I wonder if this could lead to confusing conflicts.
If there is a strong motivation to keep the autoupdate+autofix coupled regardless of autofix value in the config, would it be possible for the ci docs for this option to be updated to reflect this behaviour?
Happy to open a PR for the docs if that is preferred.
Hi @asottile,
Thanks a lot for your work developing pre-commit/pre-commit-ci.
I was wondering if there is any way to configure the autoupdating function of pre-commit-ci to also respect the
autofix_PRs: false
setting, such that if an autoupdate includes a hook bump that introduces new formatting rules, that formatting is not applied automatically as part of the PR which updates the hook. We experienced this with theblack
update recently, see: https://github.com/neurobagel/api/pull/278/files for example (we do not want the autoupdate to touch non pre-commit-config.yaml files automatically).Our pre-commit-ci config:
Appreciate your help!
The text was updated successfully, but these errors were encountered: