Commit 96d61884 authored by Yorick Peterse's avatar Yorick Peterse Committed by Albert Salim

Make Danger more strict about Git trailers

This is based on
https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5197.
Previously Danger would allow trailers such as `Changelog: foo bar baz`,
even though those are not valid changelog trailers.
parent 045a85bf
......@@ -20,7 +20,7 @@ CATEGORIES = YAML
.freeze
def check_changelog_trailer(commit)
trailer = commit.message.match(/^Changelog:\s*(?<category>\w+)/)
trailer = commit.message.match(/^Changelog:\s*(?<category>.+)$/)
return :missing if trailer.nil? || trailer[:category].nil?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment