diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 4a04494a..88bda37d 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -9,13 +9,12 @@ jobs: runs-on: ubuntu-22.04 steps: - run: env | sort - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Validate the latest commit message with commitlint if: github.event_name == 'push' - run: echo "${{ github.event.head_commit.message }}" | npx commitlint + run: echo "${{ github.event.head_commit.message }}" | npx commitlint -x @commitlint/config-conventional - name: Validate pull request title with commitlint if: github.event_name == 'pull_request' - run: echo "${{ github.event.pull_request.title }}" | npx commitlint + run: echo "${{ github.event.pull_request.title }}" | npx commitlint -x @commitlint/config-conventional on: pull_request: types: diff --git a/.gitlab/workflows/commitlint.yml b/.gitlab/workflows/commitlint.yml index f2fcad26..301f613b 100644 --- a/.gitlab/workflows/commitlint.yml +++ b/.gitlab/workflows/commitlint.yml @@ -1,7 +1,7 @@ commitlint: image: name: commitlint/commitlint:19.3.1@sha256:02c8c31b2c61c51eadb410960648c8b370f7583609f4ca1520155eeeefd63d66 - entrypoint: [""] + entrypoint: [''] interruptible: true rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" @@ -9,8 +9,10 @@ commitlint: script: - | if [ "$CI_PIPELINE_SOURCE" = "push" ]; then - echo "$CI_COMMIT_TITLE" | commitlint + echo "$CI_COMMIT_TITLE" | commitlint -x @commitlint/config-conventional elif [ "$CI_PIPELINE_SOURCE" = "merge_request_event" ]; then - echo "$CI_MERGE_REQUEST_TITLE" | commitlint + echo "$CI_MERGE_REQUEST_TITLE" | commitlint -x @commitlint/config-conventional fi stage: ci + variables: + GIT_STRATEGY: none diff --git a/package.json b/.releaserc.json similarity index 97% rename from package.json rename to .releaserc.json index 71a24212..7f4574f5 100644 --- a/package.json +++ b/.releaserc.json @@ -1,9 +1,4 @@ { - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, "release": { "plugins": [ [ diff --git a/template/package.json.jinja b/template/.releaserc.json.jinja similarity index 97% rename from template/package.json.jinja rename to template/.releaserc.json.jinja index ce0ba734..c014419c 100644 --- a/template/package.json.jinja +++ b/template/.releaserc.json.jinja @@ -1,9 +1,4 @@ { - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, "release": { "plugins": [ [ diff --git a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/commitlint.yml b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/commitlint.yml index 4a04494a..88bda37d 100644 --- a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/commitlint.yml +++ b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/commitlint.yml @@ -9,13 +9,12 @@ jobs: runs-on: ubuntu-22.04 steps: - run: env | sort - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Validate the latest commit message with commitlint if: github.event_name == 'push' - run: echo "${{ github.event.head_commit.message }}" | npx commitlint + run: echo "${{ github.event.head_commit.message }}" | npx commitlint -x @commitlint/config-conventional - name: Validate pull request title with commitlint if: github.event_name == 'pull_request' - run: echo "${{ github.event.pull_request.title }}" | npx commitlint + run: echo "${{ github.event.pull_request.title }}" | npx commitlint -x @commitlint/config-conventional on: pull_request: types: diff --git a/template/[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/commitlint.yml b/template/[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/commitlint.yml index f2fcad26..301f613b 100644 --- a/template/[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/commitlint.yml +++ b/template/[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/commitlint.yml @@ -1,7 +1,7 @@ commitlint: image: name: commitlint/commitlint:19.3.1@sha256:02c8c31b2c61c51eadb410960648c8b370f7583609f4ca1520155eeeefd63d66 - entrypoint: [""] + entrypoint: [''] interruptible: true rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" @@ -9,8 +9,10 @@ commitlint: script: - | if [ "$CI_PIPELINE_SOURCE" = "push" ]; then - echo "$CI_COMMIT_TITLE" | commitlint + echo "$CI_COMMIT_TITLE" | commitlint -x @commitlint/config-conventional elif [ "$CI_PIPELINE_SOURCE" = "merge_request_event" ]; then - echo "$CI_MERGE_REQUEST_TITLE" | commitlint + echo "$CI_MERGE_REQUEST_TITLE" | commitlint -x @commitlint/config-conventional fi stage: ci + variables: + GIT_STRATEGY: none