🚨(gitlint) Allow uppercase in commit messages
Many developers use uppercase as the first letter in their commit messages, it creates an error. We will allow uppercase in commit messages to lower frustration when committing.
This commit is contained in:
@@ -19,6 +19,7 @@ and this project adheres to
|
|||||||
|
|
||||||
- 🧑💻(frontend) change literal section open source #702
|
- 🧑💻(frontend) change literal section open source #702
|
||||||
- ♻️(frontend) replace cors proxy for export #695
|
- ♻️(frontend) replace cors proxy for export #695
|
||||||
|
- 🚨(gitlint) Allow uppercase in commit messages #756
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ All commit messages must adhere to the following format:
|
|||||||
|
|
||||||
* <**gitmoji**>: Use a gitmoji to represent the purpose of the commit. For example, ✨ for adding a new feature or 🔥 for removing something, see the list here: <https://gitmoji.dev/>.
|
* <**gitmoji**>: Use a gitmoji to represent the purpose of the commit. For example, ✨ for adding a new feature or 🔥 for removing something, see the list here: <https://gitmoji.dev/>.
|
||||||
* **(type)**: Describe the type of change. Common types include `backend`, `frontend`, `CI`, `docker` etc...
|
* **(type)**: Describe the type of change. Common types include `backend`, `frontend`, `CI`, `docker` etc...
|
||||||
* **title**: A short, descriptive title for the change, starting with a lowercase character.
|
* **title**: A short, descriptive title for the change.
|
||||||
* **description**: Include additional details about what was changed and why.
|
* **description**: Include additional details about what was changed and why.
|
||||||
|
|
||||||
### Example Commit Message
|
### Example Commit Message
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class GitmojiTitle(LineRule):
|
|||||||
"https://raw.githubusercontent.com/carloscuesta/gitmoji/master/packages/gitmojis/src/gitmojis.json"
|
"https://raw.githubusercontent.com/carloscuesta/gitmoji/master/packages/gitmojis/src/gitmojis.json"
|
||||||
).json()["gitmojis"]
|
).json()["gitmojis"]
|
||||||
emojis = [item["emoji"] for item in gitmojis]
|
emojis = [item["emoji"] for item in gitmojis]
|
||||||
pattern = r"^({:s})\(.*\)\s[a-z].*$".format("|".join(emojis))
|
pattern = r"^({:s})\(.*\)\s[a-zA-Z].*$".format("|".join(emojis))
|
||||||
if not re.search(pattern, title):
|
if not re.search(pattern, title):
|
||||||
violation_msg = 'Title does not match regex "<gitmoji>(<scope>) <subject>"'
|
violation_msg = 'Title does not match regex "<gitmoji>(<scope>) <subject>"'
|
||||||
return [RuleViolation(self.id, violation_msg, title)]
|
return [RuleViolation(self.id, violation_msg, title)]
|
||||||
|
|||||||
Reference in New Issue
Block a user