Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: add commitlint config command #169

Closed
wants to merge 13 commits into from

Conversation

marionebl
Copy link
Contributor

@marionebl marionebl commented Nov 30, 2017

Add a commitlint config command

Description

This adds a new command to commitlint cli that prints the current fully resolved config to stdout.

Via --format=json the output can be optimized for consuming machinery. The format option is introduced to the plain commlint command, too.

Motivation and Context

Tools such as commitlintbot and commitlint-bot require access to the resolved config while being unable to execute configs with io (e.g. lerna).

A workaround has been outlined that requires a tool on CI (where io is possible) to send fully resolved config to a bot, which in turn can use this config to lint commits / PR titles.

Usage examples

$ commitlint config
extends:    
config-lerna
├── config-conventional
└── config-lerna-scopes
parser:      angular
Rules:
  - type-enum: ci, 

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

ToDO

  • commitlint config
  • Tests for commitlint config
  • JSON output from parent command
  • Tests for commitlint --format=json

@marionebl marionebl force-pushed the feat-cli-config-resolver branch from 723ffb5 to f60ea16 Compare November 30, 2017 20:50
@marionebl
Copy link
Contributor Author

Did a prerelease publish via the next tag, should pull 5.3.0-0

@marionebl marionebl closed this Nov 25, 2018
@marionebl marionebl deleted the feat-cli-config-resolver branch June 1, 2019 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant