Skip to content

Add better support for footer issue references #43

Description

@mavolin

Currently, when autocompleting a footer token, a colon is always added. While this is the desired behavior in most cases, the conventional commit specification states that this should not be done, if followed by an issue reference, e.g. Closes #123:

Each footer MUST consist of a word token, followed by either a :<space> or <space># separator, followed by a string value (this is inspired by the git trailer convention).

~ Conventional Commit Spec, Point 8

Possible Implementation

First of all, when linting the commit message, a warning should be shown, if the footer's value starts with ": #". This could be paired with the option to auto-fix this, depending on whether the footer's value is an issue reference or plain text, to remove the colon or the '#`, respectively.

Additionally, an "issue reference" option could be added to the footer types settings. This should be turned on for Closes, Implements, and Refs. If turned on, " #" will be inserted after the token, instead of ": ". This should cover most cases, as issue refs are mostly used for those three.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions