diff options
author | Toon Claes <toon@gitlab.com> | 2019-07-05 10:53:16 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-07-05 10:54:16 +0200 |
commit | 2b4573b555f9012237f6adef0d4f4b7c3288784c (patch) | |
tree | 5f8e6bea20ad696703e0585ab316aeeedc1f3380 /lib | |
parent | 1e11e6ad9a7c0f48e2779db39976a5aeee3770a6 (diff) | |
download | gitlab-ce-database-review-docs.tar.gz |
Further improve database review processdatabase-review-docs
Based on the comments, we're dropping the use of a "Database Review"
issue, and I'm improve Danger more to get database reviewers suggested
by roulette.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/danger/helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/danger/helper.rb b/lib/gitlab/danger/helper.rb index 0fc145534bf..f297cff93c2 100644 --- a/lib/gitlab/danger/helper.rb +++ b/lib/gitlab/danger/helper.rb @@ -46,6 +46,16 @@ module Gitlab ee? ? 'gitlab-ee' : 'gitlab-ce' end + def markdown_list(items) + list = items.map { |item| "* `#{item}`" }.join("\n") + + if items.size > 10 + "\n<details>\n\n#{list}\n\n</details>\n" + else + list + end + end + # @return [Hash<String,Array<String>>] def changes_by_category all_changed_files.each_with_object(Hash.new { |h, k| h[k] = [] }) do |file, hash| |