python-discord / sir-lancebot

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
MIT License
240 stars 240 forks source link

Add `.gitmessage` to allow for consistent commit messages #834

Open brad90four opened 3 years ago

brad90four commented 3 years ago

Description

Add a .gitmessage file to the root directory of sir-lancebot to have the same message come up for running the command line git commit command. There are templates that exist and can be modified to match the communities needs. Users will have to configure their .gitconfig (or this can be pushed as well) to use the .gitmessage as the template for their commit messages. The command line command to configure this is:

From the root of sir-lancebot: git config --local commit.template ./.gitmessage Users may need to change the relative path to the .gitmessage

Reasoning

This will give the chance for user's commit messages to be more uniform. It is not a guarantee.

Proposed Implementation

  1. Create .gitmessage file and allow users to configure their own .gitconfig
  2. Create .gitmessage file and update .gitconfig with adding these lines:
    ...
    [commit]
    template = ~/.gitmessage
    ...

Additional Details

Example .gitmessage.txt:

# 50 characters                                 #
# Subject
# (If implemented this commit will ___)

# 72 characters                                                       #
# Problem
# Problem, Task, Reason for Commit
# Solution
# Solution or List of Changes
# Note
# Special instructions, testing steps, rake, etc

# Issue #

View from command line commit: image

Would you like to implement this yourself?

Akarys42 commented 2 years ago

That's an interesting idea, I'm not a fan of the structure of the proposed template, but if we have a good one to use, sure, why not. I do like the mention of length limits and what should each paragraph be though.