diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-06-28 18:21:11 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-07-16 23:21:25 +0800 |
commit | c78af51776e9d60b8db58df335a1b3889e6ffc39 (patch) | |
tree | 8aae81b539f95c899502c1158c6c20f5e8bf5eb5 | |
parent | 4b789202cef7632475fc90cee040464ea88a16c3 (diff) | |
download | gitlab-ce-danger-apply-suggestions-72-chars.tar.gz |
Yes! Yes! Yes!danger-apply-suggestions-72-chars
-rw-r--r-- | danger/commit_messages/Dangerfile | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/danger/commit_messages/Dangerfile b/danger/commit_messages/Dangerfile index 15e94fb7aef..0c675cc4c9c 100644 --- a/danger/commit_messages/Dangerfile +++ b/danger/commit_messages/Dangerfile @@ -89,13 +89,16 @@ def lint_commit(commit) # rubocop:disable Metrics/AbcSize return false if commit.message.start_with?('Revert "') # Fail if a suggestion commit is used and squash is not enabled - if commit.message.start_with?('Apply suggestion to') && !gitlab.mr_json['squash'] - fail_commit( - commit, - 'If you are applying suggestions, enable squash in the merge request and re-run the failed job' - ) - - return true + if commit.message.start_with?('Apply suggestion to') + if gitlab.mr_json['squash'] + return false + else + fail_commit( + commit, + 'If you are applying suggestions, enable squash in the merge request and re-run the failed job' + ) + return true + end end failures = false |