jonallured / danger-commit_lint Goto Github PK
View Code? Open in Web Editor NEWUse Danger to lint your commit messages
License: MIT License
Use Danger to lint your commit messages
License: MIT License
This should do it:
t.options = ['--display-cop-names']
We just had this situation in one of our projects and the (junior) developer tried to find the issue by clicking the link and checking the changes of the commit. He couldn't find it there though because there was no code which should start with a capital letter in any of his changes. He never even had the idea that this could be related to the commit message, because the word "commit" is not mentioned at all in the error message. There's also no mention of "CommitLint" anywhere that he could have second guessed.
I showed the same PR to another Junior and she had the same problem. So I can say with confidence due to these objservations that the messages are not clear and should at least state the word "commit" if not even "commit message" in them in any kind of warning or error.
Hey @jonallured,
I'm checking in to see if you'd be open to me adding a rule looking for a "reference" at the start of the commit. We use a convention at work for JIRA ticket references. It looks like this
[ABC-123] Implement thing
Where ABC-123
is a reference to the JIRA card that the commit relates to. For commits that don't have a reference we use something like [No-JIRA]
or [None]
. Would you be open to me adding something like this.
Unrelated: Is there anything in the plugin that currently makes it GitHub only or should it work with any git host?
It would be awesome if this plugin would support Conventional Commits
Currently this gem is locked to 5.0:
You might replace that with
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
Thank you!
As @amatriain points out in feedjira/feedjira#366, Commit Lint doesn't do anything to help one fix what has been marked as broken.
I think I've taken it for granted that people know about amending messages and interactive rebasing, not to mention that force pushing their branch is totally appropriate. What I'd like to see is a write up of some ways you can fix a violation and then when the bot comments, the comment should link to this write up.
I'd like to see if I can get Danger running on this very project. Specifically I'd like to test that #12 works before I cut a version of the gem.
I understand that the default length is set to 50, but I think this plugin would be much more useful if it was more flexible. While turning on and off and setting the level (warning/failure) is possible, I think for subject_length
there should also be a possibility to configure a different limit than 50
which is of course a community best practice, but nevertheless a "magic number" that might not be working for everyone. For example I prefer to have a limit of 80
in my projects for various reasons I think I should not need to explain here.
I often get asked "why should I write my commits like this?!", in which case I try to redirect people to Git's Commit Guidelines.
It might be useful to add a link to this in the README?
Currently this gem is locked to 3.0:
Thank you!
Thank you so much for creating this Danger Plugin. I think it's very useful. Unfortunately my first interaction looked something like this:
Warnings ⚠️ Please start commit subject with capital letter. commit1 ⚠️ Please start commit subject with capital letter. commit2 ⚠️ Please start commit subject with capital letter. commit3 ⚠️ Please start commit subject with capital letter. commit4 ⚠️ Please start commit subject with capital letter. commit5 ⚠️ Please start commit subject with capital letter. commit6 ⚠️ Please start commit subject with capital letter. commit7 ⚠️ Please start commit subject with capital letter. commit8 ⚠️ Please start commit subject with capital letter. commit9
I was in love in first sight, but I think most people would have preferred something less repetitive:
Warnings ⚠️ Please start commit subjects with capital letter.
commit1 commit2 commit3 commit4 commit5 commit6 commit7 commit8 commit9
I've not tried ruby before, would you still be up for a PR?
Ruby 2.4 was released, so I need to cycle things. Step one is to update my local environment and ensure everything is cool there. Since I don't check this into the repo, nothing will change here. From there, it'll just be updating the Travis config. I'll need to drop 2.1 and add 2.4. I'm not sure what I'll do with 2.3 - right now I've hard-coded it to 2.3.1
, but I'd like to generalize that if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.