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 message validation #8

Open
DerekNonGeneric opened this issue Nov 29, 2020 · 8 comments
Open

🏷️ commit message validation #8

DerekNonGeneric opened this issue Nov 29, 2020 · 8 comments
Assignees

Comments

@DerekNonGeneric
Copy link
Member

DerekNonGeneric commented Nov 29, 2020

https://gist.github.com/DerekNonGeneric/4388e46e78ea05d53be5e78b63f4c7f1

Constraints

  • Maximum line-length of a commit message's first line is 50
  • Second-line should be blank
  • Maximum line-length of a commit message's third line (and all subsequent lines) is 72
@DerekNonGeneric
Copy link
Member Author

There is more information about emoji meanings at https://gist.github.com/DerekNonGeneric/2ad0a083150e1ecce1314bca8fed1ed0.

@DerekNonGeneric
Copy link
Member Author

Here are a few ground rules to follow (for the first line of the commit message):

  • When reasonable, do your best to abstain from using quotes (of any kind)
    in the first line of the commit message — they take up space (which is limited).
  • When deciding whether or not to capitalize the name of something (such as a tool)
    prefer the lowercase variant when possible — it encompasses both the CLI command
    and proper noun of the tool. This helps to avoid having to remember if the tool has any
    stylistic capitalization and also helps to prevent distracting the reader of the commit message.

@DerekNonGeneric DerekNonGeneric changed the title meta: commit message validation 🏷️ commit message validation Jan 3, 2021
@DerekNonGeneric DerekNonGeneric changed the title 🏷️ commit message validation meta: commit message validation Jan 6, 2021
@DerekNonGeneric DerekNonGeneric changed the title meta: commit message validation 🏷️ commit message validation Jan 12, 2021
@DerekNonGeneric
Copy link
Member Author

DerekNonGeneric commented Jan 9, 2022

According to @shellscape, we should not use emoji in commit messages due to their carcinogenic nature.

git commit conventions that require emoji are cancer
https://twitter.com/shellscape/status/1478441782526595081

A @OpenINF Twitter poll had similar findings.

If you were to represent the word ❝bug fix❞ as an emoji in a commit message, which emoji would you use?
The winning result was “Do not use emoji”
https://twitter.com/openinf/status/1357196833672593409


This issue must remain open until we can decide which commit message convention we should follow.

@shellscape
Copy link

lol thanks for the tag. I concur.

@DerekNonGeneric
Copy link
Member Author

So, git commits bad, but what about for issues or PR titles?

@DerekNonGeneric
Copy link
Member Author

I want to set up a webhook on our repos that hits a small web service that checks for a Signed-off-by string in the commit message of PRs being made. This technique is described in greater detail near the bottom of the Git Book page on the matter. I intend for this to be added to our commit conventions style guide document and intend for it to be required for all contributions as we advance, so it would be nice for CI to be able to catch and enforce that.

However, there may be a more intelligent way to do this. The GitHub Blog just posted a new article on the subject (see refs), which they appear to have another solution in use (Probot GitHub App).

I am all 👂 if anyone is aware of an alternative or more-preferable solution for this.

Refs: https://github.blog/changelog/2022-06-08-admins-can-require-sign-off-on-web-based-commits/

/cc @yuvilio

@DerekNonGeneric
Copy link
Member Author

DerekNonGeneric commented Feb 26, 2023

image

☝️ this app/service has been failing for passable commits, so going to remove it maybe

https://probot.github.io/apps/dco/

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

3 participants