Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pre-commit hook suggestions#604

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
SmileyChris wants to merge3 commits intotwisted:trunk
base:trunk
Choose a base branch
Loading
fromSmileyChris:precommit-changes

Conversation

@SmileyChris
Copy link
Contributor

@SmileyChrisSmileyChris commentedMay 24, 2024
edited
Loading

Description

As discussed in#600, here are my suggestions on the pre-commit changes.

  • renamingtowncrier-check ->towncrier-draft. It is set to trigger if any text files have changed.
  • addingtowncrier-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.
  • updatetowncrier-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...)

@adiroiban
Copy link
Member

Thanks for the PR.

I have never used to pre-commit hooks for my projects.

I have custom GitHub actions steps to calltowncrier as part of a PR branch protection checks and I always do both check and draft.

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 forcheck and draft

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.
So maybe, just as a review to @twisted/towncrier-contributors


My only important comment is about backward compatibility.

I see thetest 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

-repo:https://github.com/twisted/towncrier
rev:23.11.0
hooks:
-id:towncrier-check


I guess that this PR will update .pre-commit-config.yaml to add the news hooks.


I have never usedtowncrier-update .

Does this hook make sense ?

@SmileyChris
Copy link
ContributorAuthor

SmileyChris commentedMay 29, 2024
edited
Loading

Personally I think the only sensible hook is one that does the equivalent oftowncrier check. It makes sense to have a pre-merge git hook to check for the presence of a news fragment.

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 keepingtowncrier-check around and just have it raise a deprecation warning.

If we think there's no use to them, I'm fine "burning the chaff" too.

@adiroiban
Copy link
Member

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

@SmileyChrisSmileyChris mentioned this pull requestJun 14, 2024
@dorschw
Copy link
Contributor

Hey, this can be useful for us, any ETA for a merge? (I saw the discussion)

@adiroiban
Copy link
Member

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 intowncrier.

Cheers

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@SmileyChris@adiroiban@dorschw

[8]ページ先頭

©2009-2025 Movatter.jp