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

[Docs] Minor suggestion for ensuring good quality commit messages #326

Open
mickeypash opened this issue Jan 31, 2023 · 0 comments
Open

Comments

@mickeypash
Copy link

What is currently missing?

I noticed that in your CONTRIBUTING guide you reference Chris Beam's blogpost.
However there is currently no way to encourage/enforce these suggested practices.

How could this be improved?

A simple solution would be to use a commit message template.
It can be part of this repository. Here's how it could work:

  • We would add a new file called .gitmessage
  • It would contain the template below.
  • The CONTRIBUTING.md would contain the following

With git command :

$ git config commit.template .gitmessage

Or by adding in the config file the following lines :

[commit]
  template = .gitmessage

Git commit message template .gitmessage

# Title: Summary, imperative, start upper case, don't end with a period
# No more than 50 chars. #### 50 chars is here: #

# Remember blank line between title and body.

# Body: Explain *what* and *why* (not *how*). Include task ID (Jira issue).
# Wrap at 72 chars. ################################## which is here: #


# At the end: Include Co-authored-by for all contributors. 
# Include at least one empty line before it. Format: 
# Co-authored-by: name <user@users.noreply.github.com>
#
# How to Write a Git Commit Message:
# https://chris.beams.io/posts/git-commit/
#
# 1.Separate subject from body with a blank line
# 2. Limit the subject line to 50 characters
# 3. Capitalize the subject line
# 4. Do not end the subject line with a period
# 5. Use the imperative mood in the subject line
# 6. Wrap the body at 72 characters
# 7. Use the body to explain what and why vs. how
EOF

Is this a feature you would work on yourself?

[X] I plan to open a pull request for this feature

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

No branches or pull requests

1 participant