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

[no_commit_to_branch] Add user friendly error message #979

Conversation

Destroy666x
Copy link

Prints a user-friendly message in case the action is disallowed on a branch. As of now it just shows "error", which is fine if you added the hook, but terrible UX for people using it in some project (e.g. installed automatically in devcontainer) for the 1st time.

@asottile
Copy link
Member

please discuss issues before spending time on a pull request -- thanks

@asottile asottile closed this Oct 19, 2023
@asottile
Copy link
Member

you can override name to whatever makes sense for your usecase

@Destroy666x
Copy link
Author

Overriding name in a completely non-dynamic way as a universal recipe for fixing UX is really not it and I expected that kind of comment to appear looking at what I found in your repos - e.g. one issue which bunch of downvotes for your comments stating that custom error messages for hooks would be useless.

Also, I spent time on it mostly for people who'd like an alternative - they can feel free to use the fork like I'll do, ¯_(ツ)_/¯ what happens with this PR - you made a quick choice which is fine with me.

@pre-commit pre-commit locked as resolved and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants