Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-09-29 17:24:16 +0300
committerSean McGivern <sean@gitlab.com>2017-09-29 17:24:16 +0300
commite73c9ddc9e7c3191e5d16e7c42fb39867b38862b (patch)
tree7912a228397829b557fae7714bff805e361f79c8 /scripts
parentf984d35f1cd9407f33a6be2d5be8d8ad4be790dd (diff)
Extend changelog checker to test file extensions
Changelogs without a .yml extension won't be picked up, and will be ignored completely, so fail the pipeline when one of those is found.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/lint-changelog-yaml7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lint-changelog-yaml b/scripts/lint-changelog-yaml
index 402a0c42bd3..cce5f1c7667 100755
--- a/scripts/lint-changelog-yaml
+++ b/scripts/lint-changelog-yaml
@@ -2,7 +2,10 @@
require 'yaml'
-invalid_changelogs = Dir['changelogs/**/*.yml'].reject do |changelog|
+invalid_changelogs = Dir['changelogs/**/*'].reject do |changelog|
+ next true if changelog =~ /(archive\.md|unreleased(-ee)?)$/
+ next false unless changelog.end_with?('.yml')
+
begin
YAML.load_file(changelog)
rescue
@@ -10,7 +13,7 @@ invalid_changelogs = Dir['changelogs/**/*.yml'].reject do |changelog|
end
if invalid_changelogs.any?
- puts "Changelogs with invalid YAML found!\n"
+ puts "Invalid changelogs found!\n"
puts invalid_changelogs.sort
exit 1
else