-
Notifications
You must be signed in to change notification settings - Fork 122
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
Pre-commit hook suggestions #604
base: trunk
Are you sure you want to change the base?
Conversation
Thanks for the PR. I have never used to pre-commit hooks for my projects. I have custom GitHub actions steps to call And draft is piped to GitHub Action summary , for easy review... just like we have for towncrier itself https://github.com/twisted/towncrier/actions/runs/9216320582#summary-25356369369 I am -1 for having a separate hook for Don't worry to much. As I mentioned, I am not using pre-commit hooks... so I don't care too much. But I think that it would help to get feedback for more people. My only important comment is about backward compatibility. I see the test pass. So the change should be ok. I think that for backward compatibility testing, it's important to keep this check, pinned at the current version towncrier/.pre-commit-config.yaml Lines 37 to 40 in 15d1e25
I guess that this PR will update .pre-commit-config.yaml to add the news hooks. I have never used Does this hook make sense ? |
Personally I think the only sensible hook is one that does the equivalent of My suggestions here were to add that one, but keep the others and just better document them (and have more sensible naming and better defaults). The only other related change that may make sense is keeping If we think there's no use to them, I'm fine "burning the chaff" too. |
It ok to have them. No problem. I am not a big user of pre-commit , so anything is ok for me. I am not -1. We can have this PR in review for one week, and if you are happy with the hooks and nobody is agains the changes, we can merge it. Thanks |
Hey, this can be useful for us, any ETA for a merge? (I saw the discussion) |
Hi @dorschw this PR is still draft.... and currenlty inactive. If you have time, you can try to create a PR with the kind of pre-commit hooks that you would like to have in Cheers |
Description
As discussed in #600, here are my suggestions on the pre-commit changes.
towncrier-check
->towncrier-draft
. It is set to trigger if any text files have changed.towncrier-checks
(which doestowncrier check
, but keeping the name different so it doesn't clash with the renamed previous hook). It is set to always trigger beforegit push
.towncrier-update
(this doestowncrier build
but I don't think the name needs changing) to only trigger by themanual
stage by default (as I doubt you'd want to do this every time you commit...)