Skip to content

changeset version throws error using CLI with commitlint pre-commit hooks #1234

@tysian

Description

@tysian

Affected Packages

  • @changesets/cli
  • @changesets/git

Problem

I'm using @changesets/cli with commitlint pre-commit hook. When running changeset version command, it does everything correctly except commiting all the changes.

Note
I'm running commands manually.

I'm getting this error:

$ npx changeset version
🦋  error Changesets ran into trouble committing your files

After removing pre-commit hook, this command runs correctly.

I don't have reproduction, but here is my repo with all my configuration: https://github.com/tysian/wp-theme-cli

Proposed solution

Allow to run --no-verify when commiting using changeset version like this:

  • changeset version --no-verify or
  • changeset version --skip-hooks

or

Allow to set custom commit message in .changeset/config.json like this:

{
  "commit_message": {
    "version": "chore: bump {package} to {version}"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions