diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2020-02-06 18:58:56 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2020-02-06 18:58:56 +0300 |
commit | 03d6e97befc6dd61609f521def15bc90a689d1f5 (patch) | |
tree | b41ba606d207ac8f45b47e9d23f9afa4172ff217 | |
parent | 44617907069597b8a6e9e1b373465a429e90215a (diff) |
Incorrect changelogs should be caught by Danger
-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? |