Commit graph

13 commits

Author SHA1 Message Date
Lin Jen-Shin
e9598f80a1 Resolve "Fix danger commit messages check" 2019-02-22 11:56:45 +00:00
Kamil Trzciński
d8145aa693 Refactor commit_messages#lint_commit
This introduces additional method for linting,
to reduce the complexity of `lint_commits`.
2019-02-20 14:25:12 +01:00
Kamil Trzciński
9d842c704a Ignore revert commits 2019-02-19 15:05:45 +01:00
Drew Blessing
efe7f4f768 Fix Danger commit message errors 2019-01-11 22:22:10 +00:00
Paul Slaughter
193f764bc2
Shorten danger 50 char commit warning
- Also pulls URLs into vars
2019-01-11 07:33:02 -06:00
Rémy Coutable
8f9d9112e6
Only detect short refs followed by \b in Danger
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-08 16:37:06 +01:00
Sam Bigelow
0f069485c6 Clarify messaging on what fails for too many failed lines 2018-12-17 06:42:59 +00:00
Yorick Peterse
8e3eb91924
Relax the subject line requirements for commits
This changes the hard limit of 50 to a soft limit of 50, with the new
hard limit being 72 characters. This gives people a bit more space,
while still (hopefully) guiding them towards subject lines that are
roughly 50 characters long.

Fixes https://gitlab.com/gitlab-org/release/framework/issues/16
2018-09-19 15:27:50 +02:00
Yorick Peterse
4ef1dd09dd
Improve Emoji detection in commit messages
This changes our Danger integration so that it is smarter about
detecting GitLab emoji in commit messages. This is done using a two step
process:

1. We use the old regular expression to determine if a commit message
   _might_ include an emoji.

2. If this regular expression matches, we then check for all existing
   emoji names in the commit message. This might be a wee bit expensive,
   but because we couple it with the previous step it should be rarely
   executed.

This ensures we don't trigger an error when a commit message includes
text such as `:foo:bar:`, which is not a valid Emoji.

Fixes https://gitlab.com/gitlab-org/release/framework/issues/15
2018-09-18 16:22:29 +02:00
Robert Speicher
69925767b7 Merge branch 'danger-commit-count' into 'master'
Relax Danger requirements about changed lines

Closes gitlab-org/release/framework#13

See merge request gitlab-org/gitlab-ce!21739
2018-09-14 17:12:47 +00:00
Lukas Eipert
40f8145845 Fix typo in Danger message 2018-09-14 14:01:52 +00:00
Yorick Peterse
42f90b5f50
Relax Danger requirements about changed lines
This relaxes the commit rules regarding the number of changed lines.
Previously we required a detailed description if 20 or more lines were
changed. Starting with this commit we change the rules so Danger only
notifies you about writing a detailed description if:

1. A commit changes more than 3 files
2. The same commit changes more than 30 lines

This should make it easier to do a find replace to fix a typo, without
having to repeat what the subject line already says, while still
reminding developers to write a detailed description for new features
and other larger changes.

Fixes https://gitlab.com/gitlab-org/release/framework/issues/13
2018-09-14 13:55:29 +02:00
Yorick Peterse
28b56b7172
Added Danger file to lint commit messages
This Dangerfile ensures that commit authors write good commit messages.
We also prevent the use of Emoji, since these add no value and may not
always be displayed properly.

Merge commits are currently ignored. In the future we most likely want
to stop using these, but this is a separate discussion, hence we ignore
them for the time being.

The rules enforced by this Dangerfile are based on the article found at
https://chris.beams.io/posts/git-commit/. For more information, refer to
https://gitlab.com/gitlab-org/gitlab-ce/issues/50003.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/50003
2018-09-10 14:12:58 +02:00