tern-tools / tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
BSD 2-Clause "Simplified" License
949 stars 187 forks source link

Use commitlint to lint commits #914

Open JamieMagee opened 3 years ago

JamieMagee commented 3 years ago

Problem Statement Looking at #911, we are spending time maintaining CI scripts, whereas we could rely on the work of the wider open source community instead.

Describe the Proposal Replace the script test_commit_message.py with commitlint, run by a GitHub action, and convert our commit message requirements to commit lint rules.

I think this can also help with #885. If we require conventional commit messages, we can make use of further existing automation to easily release new versions, with the correct version bump, entirely automatically.

Steps to Implement Proposal

  1. Define our commit rules in commitlint's format
  2. Create a GitHub workflow using the commitlint action
nishakm commented 3 years ago

Related issue #933

sayantani11 commented 2 years ago

@nishakm can I help? But I would require a bit of insight on the task.

nishakm commented 2 years ago

@sayantani11 I actually don't know how commitlint works, so I will have to do some research myself! Maybe you could research step 1 in the issue description. Our commit message rules are in the CONTRIBUTING.md.

sayantani11 commented 2 years ago

@nishakm https://github.com/tern-tools/tern/blob/main/CONTRIBUTING.md#coding-style https://github.com/tern-tools/tern/blob/main/CONTRIBUTING.md#commit-message-format These are the ones defining rules right?

nishakm commented 2 years ago

@sayantani11 Yup! those are the rules.