Skip to content

Warn about long Squash and Merge commit message #1475

Closed

Description

@ark120202

When merging pull requests with Squash and Merge button it's possible to write too long header message, resulting trauncated line in commit log.

It would be useful to add a warning, similarly to what GitHub shows for file edit interface
image

Not sure if the limit should be 50 characters, like github has, or 72, like in commitlint/config-conventional and vscode's git.inputValidation setting.

It may be also useful to add a per-line limit to commit body and add countdown, like in vscode with "git.inputValidation": "always":
image

Activity

  1. sindresorhus commented on Nov 7, 2018

    @sindresorhus
    Member

    Makes sense. PR welcome.


    For anyone that wants this, please also send this feature request to GitHub: [email protected]

  2. fregante commented on Jan 24, 2019

    @fregante
  3. added
    small
    on Jan 24, 2019
  4. fregante commented on May 30, 2019

    @fregante
    Member

    I think the solution should be simpler:

    • Set the field size to 70 (the actual git limit, afaik)
    • Set the font to monospace so you can just see how many characters are left
    • Limit the input to 70 via maxlength attribute

    This is easier to implement. PRs welcome

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions