Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 680 Bytes

README.md

File metadata and controls

29 lines (26 loc) · 680 Bytes

commitlint action

This Github action lints commits according to Blueshoe's standards.

Add the following default config to the repository:

module.exports = {
  extends: ["@commitlint/config-conventional"],
  rules: {
    "youtrack-issue-in-scope": [2, "always"],
  },
  plugins: [
    {
      rules: {
        "youtrack-issue-in-scope": ({ scope }) => {
          return [
            scope &&
              scope.match(
                /^#((?!([A-Z0-9a-z]{1,10})-?$)[A-Z]{1}[A-Z0-9]+-[1-9][0-9]*)$/g
              ),
            "Your scope should contain a YouTrack issue number (ex. feat(#ABC-123) : description)",
          ];
        },
      },
    },
  ],
};