Skip to content

Create --no-verify checkbox - #17961

Closed
Yohannfra wants to merge 2 commits into
desktop:developmentfrom
Yohannfra:development
Closed

Yohannfra wants to merge 2 commits into
desktop:developmentfrom
Yohannfra:development

Conversation

@Yohannfra

Copy link
Copy Markdown
Contributor

Description

This PR adds a checkbox at the right of the commit message input to use the git commit flag --no-verify

Why I need this ?

In my main code repository I use a git pre-commit hook to check stuff like Prettier, Eslint and typescript build.
This hook can take up to 50 seconds to run depending of the computer I use and sometimes I know for sure that I won't break anything (editing the documentation, readme or something else) and want to avoid waiting this time to commit.

Right now to do so I must commit in CLI and add the --no-verify flag but I would like to do it directly from the comfort of Github Desktop.

This PR adds a basic implementation of this checkbox, It works from what I tested but I don't know how to design the UX/UI and some feedback or idea would be appreciated.

How to test

  1. Create a pre-commit hook
$ echo "echo fail && exit 1" > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
  1. Try to commit any change with or without the checkbox enabled

Screenshots

Capture d’écran 2024-01-05 à 03 24 33
Capture d’écran 2024-01-05 à 03 24 45

Release notes

Notes: Add --no-verify checkbox

Thank you,

Yohann

@Yohannfra

Copy link
Copy Markdown
Contributor Author

This seems to also be supported in gitkraken https://stackoverflow.com/a/75474922/11025595

This type of button is better than the checkbox

image

@tidy-dev

tidy-dev commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

@yasuking0304 Thank you for wanting to contribute! We discussed this in our team sync today and can definitely appreciate the desire to be able to skip hooks. However, this design is not something we want to incorporate. We have ongoing discussions about what modifying the commit area would look like in order to add more commit options aside from skipping hooks as well as design/engineering discussions for how to better handle hooks in general (skipping and failures). Taking this on in depth would require design and engineering capacity from our end that we do not currently have available.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants