-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get commitlint-bot working on PRS #617
Conversation
5fec500
to
1da015e
Compare
It looks like the thing to do is going to be setup a custom commitlint bot. This looks pretty easy but the bot was configured for now.sh API v1 and they are forcing new free tier apps to use v2. Until that is figured out it doesn't seem possible to have a custom configuration with the existing bot. I tried the Travis approach ... and it works but it takes time and seems like a clumsy solution to wait for our test suite just to find out a commit message is bad. |
.travis.yml
Outdated
include: | ||
- stage: lint | ||
name: "Lint commint messages" | ||
script: fold_unless_fail 'Commitlint' 'commitlint' npx commitlint-travis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need:
script: fold_unless_fail 'Commitlint' 'commitlint' npx commitlint-travis | |
script: fold_unless_fail 'Commitlint' 'commitlint' @commitlint/travis-cli |
Personally, I would specify the version, so that builds don't start failing if the linter improves:
script: fold_unless_fail 'Commitlint' 'commitlint' npx commitlint-travis | |
script: fold_unless_fail 'Commitlint' 'commitlint' @commitlint/travis[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the suggestion @rjmunro and I was honestly puzzled by how to execute the check, but your suggestion didn't work either. You don't happen to have any other ideas or know where I could find a working example do you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, whoops, sorry. I didn't mean to drop the npx
part.
script: fold_unless_fail 'Commitlint' 'commitlint' npx commitlint-travis | |
script: fold_unless_fail 'Commitlint' 'commitlint' npx @commitlint/travis[email protected] |
You could also do it in 2 steps, as done here (I presume this is working - I just found it by using github search):
https://github.com/growlerapp/webapp/blob/75a4284080bfec3b9120405267ff9550cab6ee8c/.travis.yml#L21-L23
Bump conflicted (and outdated) NPM dependencies to latest
Thanks for the help on this @rjmunro — but I just checked out the Github Action for Commitlint and it is about 2 orders of magnitude easier to setup and use. I think we'll go with that for now and keep it out of the way of our already troublesome Travis setup. |
This is an attempt to get the commitlint-bot to flunk a PR. See #549.
DO NOT MERGE.