Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

alerque
Copy link
Member

@alerque alerque commented May 21, 2019

This is an attempt to get the commitlint-bot to flunk a PR. See #549.

DO NOT MERGE.

@alerque alerque force-pushed the commitlint-bot branch 2 times, most recently from 5fec500 to 1da015e Compare May 21, 2019 08:00
@sile-typesetter sile-typesetter deleted a comment May 21, 2019
@sile-typesetter sile-typesetter deleted a comment from coveralls May 21, 2019
@sile-typesetter sile-typesetter deleted a comment May 21, 2019
@sile-typesetter sile-typesetter deleted a comment May 21, 2019
@sile-typesetter sile-typesetter deleted a comment May 21, 2019
@sile-typesetter sile-typesetter deleted a comment May 21, 2019
@alerque
Copy link
Member Author

alerque commented May 21, 2019

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need:

Suggested change
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:

Suggested change
script: fold_unless_fail 'Commitlint' 'commitlint' npx commitlint-travis
script: fold_unless_fail 'Commitlint' 'commitlint' @commitlint/travis[email protected]

Copy link
Member Author

@alerque alerque Jun 7, 2019

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?

Copy link
Contributor

@rjmunro rjmunro Jun 10, 2019

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.

Suggested change
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

@alerque alerque added this to the v0.10.x milestone Aug 22, 2019
Bump conflicted (and outdated) NPM dependencies to latest
@alerque
Copy link
Member Author

alerque commented Jan 3, 2020

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.

@alerque alerque closed this Jan 3, 2020
@alerque alerque modified the milestones: v0.10.x, v0.10.0 Jan 4, 2020
@alerque alerque deleted the commitlint-bot branch January 10, 2020 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants