tern icon indicating copy to clipboard operation
tern copied to clipboard

Use commitlint to lint commits

Open JamieMagee opened this issue 4 years ago • 5 comments
trafficstars

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

JamieMagee avatar Mar 16 '21 18:03 JamieMagee

Related issue #933

nishakm avatar Mar 31 '21 13:03 nishakm

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

sayantani11 avatar Aug 24 '21 23:08 sayantani11

@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.

nishakm avatar Aug 26 '21 03:08 nishakm

@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?

sayantani11 avatar Aug 26 '21 13:08 sayantani11

@sayantani11 Yup! those are the rules.

nishakm avatar Aug 26 '21 13:08 nishakm