diff options
author | Paul Okstad <pokstad@gitlab.com> | 2020-02-06 18:58:57 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2020-02-06 18:58:57 +0300 |
commit | 16aa12369666ce11687af459e255b11f48af8883 (patch) | |
tree | ed1a81eefca42c1d03166cc4423f559a16eea845 | |
parent | 809aba4a1006ba861799048f5e891a605ab645c1 (diff) | |
parent | 03d6e97befc6dd61609f521def15bc90a689d1f5 (diff) |
Merge branch 'zj-yaml-danger-violent-error' into 'master'
Incorrect changelogs should be caught by Danger
See merge request gitlab-org/gitaly!1811
-rw-r--r-- | changelogs/unreleased/zj-yaml-danger-violent-error.yml | 5 | ||||
-rw-r--r-- | danger/changelog/Dangerfile | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/zj-yaml-danger-violent-error.yml b/changelogs/unreleased/zj-yaml-danger-violent-error.yml new file mode 100644 index 000000000..9884939b2 --- /dev/null +++ b/changelogs/unreleased/zj-yaml-danger-violent-error.yml @@ -0,0 +1,5 @@ +--- +title: 'Incorrect changelogs should be caught by Danger' +merge_request: 1811 +author: +type: fixed diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile index ab56b0643..0273ab0e5 100644 --- a/danger/changelog/Dangerfile +++ b/danger/changelog/Dangerfile @@ -14,7 +14,7 @@ consider adding any of the %<labels>s labels. MSG def check_changelog(path) - yaml = YAML.safe_load(File.read(path)) + yaml = YAML.load_file(path) fail "`title` should be set, in #{gitlab.html_link(path)}! #{SEE_DOC}" if yaml["title"].nil? fail "`type` should be set, in #{gitlab.html_link(path)}! #{SEE_DOC}" if yaml["type"].nil? |