Danger review fails if files are edited with the web editor and the default message is used
Problem to solve
As stated in the title, there are many cases (mostly for docs) where danger-review
fails if files are edited with the editor and the default message is used. In that case, the commit will be Update file.md
, which of course is less than 3 words and not the standard for danger https://gitlab.com/gitlab-org/gitlab-ce/blob/master/danger/commit_messages/Dangerfile.
We want to lower the barrier to contributions and using the web editor is a nice way to do that. So, what should we do as maintainers when a contribution MR fails due to the commit message?
Intended users
This affects more and more people that want to make a simple change to a file and use the web editor.
Proposal
I think we can do one or more of the following:
- Train people (mostly GitLabbers) to use a proper commit message.
- Mention this or have some sort of tutorial when someone onboards, wo that they are aware of it.
- Relax the 3-word rule.
- Change our web editor to use a more descriptive message by default.
- Make it compulsory to write a commit message when in the web editor.
This is something that hurts us internally, so maybe the options to change how the feature behaves might be an overkill. Nevertheless, we need to do something about it.
Documentation
I was searching in our docs and I realized we don't have any development guidelines about this. We should create a page that describes the best practices for a commit message and mention that there's a test that will fail if you don't follow some rules.
Links / references
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28508#note_172921032