Skip to content

fix: commitlint is reading previous commit message  #3780

Closed
@chandrashekhar07

Description

@chandrashekhar07

Expected Behavior

commitlint should evaluate the current/last commit message

Current Behavior

commitlint is reading the previous commit message while evaluating the result

My commit message is: testing
But npx --no -- commitlint --edit ${1} --verbose is evaluating the result of the previous commit.

image
the

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Steps to Reproduce

My configuration:


// eslint-disable-next-line unicorn/prefer-module
module.exports = { extends: ['@commitlint/config-conventional'] };

At first, I added a valid commit message, but in the middle of committing process (husky evaluation), I canceled the process using ctrl + c

Then I changed my message to something else but still commit lint is evaluating the result of the previous commit.



### Context

_No response_

### commitlint --version

^18.4.2

### git --version

2.34.1

### node --version

v18.17.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions