From b059df8b921dc1469dd3fa85ecf690a817d9404f Mon Sep 17 00:00:00 2001 From: krishnan05 Date: Mon, 1 Apr 2024 14:42:08 +0530 Subject: [PATCH] Laberer error --- .github/{workflows/label.yml => labeler.yml} | 0 .github/workflows/commit_rules.yml | 15 +++++++++++++++ 2 files changed, 15 insertions(+) rename .github/{workflows/label.yml => labeler.yml} (100%) create mode 100644 .github/workflows/commit_rules.yml diff --git a/.github/workflows/label.yml b/.github/labeler.yml similarity index 100% rename from .github/workflows/label.yml rename to .github/labeler.yml diff --git a/.github/workflows/commit_rules.yml b/.github/workflows/commit_rules.yml new file mode 100644 index 0000000..51b0cde --- /dev/null +++ b/.github/workflows/commit_rules.yml @@ -0,0 +1,15 @@ +rules: + - name: "Commit message length" + description: "Ensure commit messages are not too long" + pattern: ".{1,50}" + error_message: "Commit messages should be between 1 and 50 characters long" + + - name: "Capitalized subject" + description: "Ensure commit message subject starts with a capital letter" + pattern: "^[A-Z].*" + error_message: "Commit message subject should start with a capital letter" + + - name: "Imperative mood" + description: "Ensure commit message subject is in imperative mood" + pattern: "(^fix|^update|^add|^remove|^refactor|^implement|^merge|^resolve|^enhance|^correct|^optimize|^adjust|^improve|^change|^test|^doc|^style|^clean)(s|es|ed|ing)?\\b" + error_message: "Commit message subject should use imperative mood"