OpenINF / open.inf.is

⚡🐋 The OpenINF portal, other static resources, and more static electricity
https://open.inf.is
2 stars 1 forks source link

🏷️ commit message validation #8

Open DerekNonGeneric opened 3 years ago

DerekNonGeneric commented 3 years ago

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

Constraints

DerekNonGeneric commented 3 years ago

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

DerekNonGeneric commented 3 years ago

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

DerekNonGeneric commented 3 years ago

Commit message validation:

DerekNonGeneric commented 2 years ago

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 commented 2 years ago

lol thanks for the tag. I concur.

DerekNonGeneric commented 2 years ago

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

DerekNonGeneric commented 2 years ago

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 commented 1 year ago

image

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

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