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

Reconfigure pre-commit hooks #155

Open
baffelli opened this issue Nov 7, 2023 · 2 comments
Open

Reconfigure pre-commit hooks #155

baffelli opened this issue Nov 7, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@baffelli
Copy link
Member

baffelli commented Nov 7, 2023

I think the current configuration of pre-commit hooks isn't very ergonomic: every time it runs, it creates a new commit in the remote repository. This means that after a push, my local changes are automatically out of sync with the remote. We should disable the pre-commit bot from producing a commit and using it only as a CI step / gate.

@baffelli baffelli changed the title Disable pre-commit hooks Reconfigure pre-commit hooks Nov 7, 2023
@edoardob90
Copy link
Member

But it should create a commit with the stuff it fixes, no? Otherwise what's the point? Only having a badge that says "your commit is good"?

@baffelli
Copy link
Member Author

baffelli commented Nov 7, 2023

I think the user should do this if the check fails. Pre-commit hooks should only modify files locally on the development environment. Other than this, I prefer that CI/CD is stateless as far as the files in the repository are concerned. I'd rather have a commit fail to merge and have to edit the files locally than always having pre-commit creating additional commits that don't have any extra changes other than formatting and styling.

The current workflow makes it more complex than necessary to work using multiple commits in a draft PR because of the additional remote commits that are created automatically.

@despadam despadam added the enhancement New feature or request label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants