samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
103 stars 24 forks source link

github: add commitlint workflow #272

Closed obnoxxx closed 1 year ago

obnoxxx commented 1 year ago

The commitlint config and workflow definition is inspired by and essentially copied from the rook one.

Signed-off-by: Michael Adam obnox@samba.org

obnoxxx commented 1 year ago

@phlogistonjohn , @synarete : an attempt at adding a commitlint ci check. this check fails in a strange way though ...

obnoxxx commented 1 year ago

commitlint complains about errors in the commitlintrc.json. I don't reaaly understand what's wrong ...

obnoxxx commented 1 year ago

the jso does in fact seem to be wrongly formatted ( in the list of components in fact. strange ... I don't seem to know enough about json to fix it ... 🤷

obnoxxx commented 1 year ago
python3 -m json.tool < .commitlintrc.json
Expecting value: line 26 column 2 (char 411)
obnoxxx commented 1 year ago

@raghavendra-talur fyi 😄

obnoxxx commented 1 year ago

Managed to fix the json! 😄 Thanks for the hint, @raghavendra-talur

obnoxxx commented 1 year ago

@spuiuk , @synarete , @anoopcs9 , @phlogistonjohn : for review, it is most important to check and agree to the list of components encoded in the commitlintrc.json file ...

phlogistonjohn commented 1 year ago

@obnoxxx & @synarete I'd like to kindly request that we focus our discussion on one commitlint PR - this one in particular since it already has the most comments. Once we've discussed this PR sufficiently I think many of the points of discussion should then "flow down" to the similar PRs on the other SINK projects.

obnoxxx commented 1 year ago

ToDos from comments and direct discussions:

@phlogistonjohn , @synarete - fyi, a summary of our discussion ...

obnoxxx commented 1 year ago

fwiw, PR #274 has been created to propose the alternative using gitlint ...

obnoxxx commented 1 year ago

I added a test commit to see commitlint fail. here we go:

You have commit messages with errors

⧗ input: foobar: introduce typo

test commit to hopefully trigger a check error in PR #272 ...

Signed-off-by: Michael Adam obnox@samba.org ✖ type must be one of [docs, resources, planner, config, ci, api, github, controllers, tests, test utils, tests/integration, ?> > i ntegration tests, hack, main, dockerfile, makefile] [type-enum]

Looks quite reasonabe;, eexcept for: why does it list [type-enum] here? and why makefile] instead of makefile ?...

obnoxxx commented 1 year ago

this is not needed any more since we enabled gitlint by merging PR #298