rhobs / observability-operator

Create Monitoring Stacks you need on your Kubernetes clusters!
Apache License 2.0
35 stars 58 forks source link

Add make commit-lint target to help contributor validate commit message locally before submitting #305

Open sthaha opened 1 year ago

sthaha commented 1 year ago

Often PRs are blocked because the commit-lint action fails - e.g. https://github.com/rhobs/observability-operator/pull/304 fails because of commit-lint https://github.com/rhobs/observability-operator/actions/runs/5377063687/jobs/9760871220

It would reduce rework and toil if we provided a make target - commit-lint which allows contributors to validate commit messages locally.

It does help if all they have to run is make lint to ensure all lints are caught before submission.

wasup-yash commented 3 months ago

COMMIT_MSG_FILE=.git/COMMIT_EDITMSG

COMMITLINT=commitlint

lint-commit:
@echo "Running commit lint..." @$(COMMITLINT) -e $$($(COMMIT_MSG_FILE))

we want something like this right?