From 3ce1f76da83fa1ea15eb382746e9147543ba9da8 Mon Sep 17 00:00:00 2001 From: Samir Kamal <1954121+skamril@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:59:56 +0100 Subject: [PATCH] WIP on feature/pr-name-lint --- .github/workflows/commitlint.yml | 8 ++++++-- commitlint.config.mjs => commitlint.config.cjs | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) rename commitlint.config.mjs => commitlint.config.cjs (72%) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 6154e20c5b..f022d846ae 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -10,12 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: wagoid/commitlint-github-action@v6 + - uses: wagoid/commitlint-github-action@v5 + with: + configFile: ./commitlint.config.cjs pr-title: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Dependencies - run: npm install @commitlint/config-conventional@^19.1.0 + run: npm install @commitlint/config-conventional - uses: JulienKode/pull-request-name-linter-action@v0.5.0 + with: + configuration-path: ./commitlint.config.cjs diff --git a/commitlint.config.mjs b/commitlint.config.cjs similarity index 72% rename from commitlint.config.mjs rename to commitlint.config.cjs index fb66fc3c21..f663c4513e 100644 --- a/commitlint.config.mjs +++ b/commitlint.config.cjs @@ -1,7 +1,11 @@ -import { RuleConfigSeverity } from "@commitlint/types"; +const RuleConfigSeverity = { + Disabled : 0, + Warning : 1, + Error : 2, +} // Config used by 'commitlint' GitHub workflow -export default { +module.exports = { extends: ["@commitlint/config-conventional"], // Rules: https://commitlint.js.org/reference/rules.html rules: {