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

Commit summary length hints (warning at 50, error at 72) #1635

Open
Zykino opened this issue Apr 4, 2023 · 4 comments · May be fixed by #1954
Open

Commit summary length hints (warning at 50, error at 72) #1635

Zykino opened this issue Apr 4, 2023 · 4 comments · May be fixed by #1954
Labels
feature-request good first issue Good for newcomers nostale immune to stale-bot

Comments

@Zykino
Copy link

Zykino commented Apr 4, 2023

Is your feature request related to a problem? Please describe.
The waning coloring on the commit message is quite restrictive. Especially when company want to tag some commits with the issue ID it resolve, if the commit is a feature, a fix, … or sometime the [functionality] impacted. Real world software (screen size, website view, …) are more tolerant on long sized summary. Learning materials I read are more permissive than this 50 char "rule", ex in https://cbea.ms/git-commit/#limit-50 they say:

So shoot for 50 characters, but consider 72 the hard limit.

Even in the linux kernel some message may be very long https://stackoverflow.com/a/11993051.

Describe the solution you'd like
When writing the summary, a warning color (yellow/orange) appear at 50 glyph, this transform in an error (current red is good) wean reaching 72 glyphs.
I really like to have a warning when I arrive at 50, I see if I should rephrase it now or not. When reaching 72 I take a bit more time to shorten my summary (and sometimes expand the body).

Describe alternatives you've considered
Keeping things as is since the real message is not limited in size. Or having configurable values.

@stale
Copy link

stale bot commented Oct 15, 2023

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the dormant Marked by stale bot on close label Oct 15, 2023
@GalaxySnail
Copy link

not stale

@stale stale bot removed the dormant Marked by stale bot on close label Oct 17, 2023
@extrawurst
Copy link
Owner

I would go for configurable yellow/red flag values (for example defaulting to 50/72).
Happy to take a PR

@extrawurst extrawurst added good first issue Good for newcomers nostale immune to stale-bot labels Oct 17, 2023
@OchirErkhembayar
Copy link

OchirErkhembayar commented Nov 15, 2023

@extrawurst Hi. Complete noob here to contributing but I like using this project daily so I would love a stab at this. I did some reading over the code and there seems to be a red warning being drawn in the commit component when the first line reaches 50 glyphs (subject to change when the PR to make multiline goes through I guess). I'm guessing the request is just to change it to yellow and then red? Is the feature request such that a user can configure the warning thresholds themselves or that it can just be changed in the code itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request good first issue Good for newcomers nostale immune to stale-bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants