Enforce commits are following our conventions via github actions#76
Conversation
8906c8c to
8322e87
Compare
|
The trailer is in the wrong format in the commit, should be:
|
78afc10 to
7ed216a
Compare
|
@plowin if you want to run the CI you have to approve the PR ;) |
8eb6a69 to
7fe20f4
Compare
|
@Soha-Albaghdady it seems that GitHub actions is picky about what it supports as base image on public runners. Right now all PRs are blocked because none of the commitlint steps run. So maybe we need to change back to There is an action for that though, that allows you to select the NPM version. Action resources should also be cached and should be the preferred way over downloading via script on the fly. |
|
This is exactly what I was referring to, github have selected specific runners that they support and encourage to use. |
It seems that they just don't support others than the listed ones. |
|
one final bit for the commit, as this is a change on the overall CI setup, I would propose the prefix |
16c544a to
7ab869d
Compare
peanball
left a comment
There was a problem hiding this comment.
I think the checkout with depth 0 may be counteracting the commit lint checking of a commit range. Could you please clarify?
306cddf to
1fe29ec
Compare
ec5551f to
65c8d49
Compare
|
Checked with "breaking change" indicator works. |
changes applied and ok. I applied further changes that I don't want to approve myself.
65c8d49 to
c9fd84f
Compare
c9fd84f to
fce5cb6
Compare
a18e
left a comment
There was a problem hiding this comment.
see comments/suggestions, otherwise great!
* breaking change handler * type enum according to our convention
Co-authored-by: Soha Alboghdady <soha.alboghdady@sap.com> Co-authored-by: Raghunath Deshpande <raghunath.deshpande@sap.com>
fce5cb6 to
d16d02a
Compare
a18e
left a comment
There was a problem hiding this comment.
If you omit the space before the subject (e.g. dep(scope)!:Subjectstarts), commitlint will fail with the error type may not be empty.
I find this confusing/misleading.
The following suggestions fix this but in a slightly hacky way (also the rule name breaking-change-indicator doesn't fit anymore).
I'm fine with the suggestion being ignored and approve of the rest of the PR.
As mentioned on the other comment, it's too hacky for me. Also for the purpose of our initial goal, i.e. "don't allow misfit commits", this does not add anything. If you wanted, you can propose a new checker (via separate PR) that does more than type-empty from the default set and inspects the commit message and all its elements in full. But I see this separate to the breaking change indicator, and a non-vital improvement. |
Adds a commitlint check job that ensures the following rules:
feat,fix,dep,doc,ci,refactor,test!before:, e.g.feat!: new breaking feature.Breaking changes must have a
breaking-change:orbreaking change:trailer. This is case in-sensitive.The commitlint configuration ensures those settings. The GitHub Actions job executes them and fails the PR validation if any of the commits in a PR are not compliant. Those can then be amended as needed by the PR author.