Merge branch 'lint-changelog-yaml' into 'master'

Add static analysis job to find invalid YAML in changelogs

See merge request gitlab-org/gitlab-ce!14518
This commit is contained in:
Robert Speicher 2017-09-29 17:22:36 +00:00
commit aec1586c05
14 changed files with 33 additions and 34 deletions

View File

@ -85,6 +85,8 @@ entry.
- [FIXED] Fixed merge request changes bar jumping.
- [FIXED] Improve migrations using triggers.
- [FIXED] Fix ConvDev Index nav item and Monitoring submenu regression.
- [FIXED] disabling notifications globally now properly turns off group/project added
emails !13325
- [DEPRECATED] Deprecate custom SSH client configuration for the git user. !13930
- [CHANGED] allow all users to delete their account. !13636 (Jacopo Beschi @jacopo-beschi)
- [CHANGED] Use full path of project's avatar in webhooks. !13649 (Vitaliy @blackst0ne Klachkov)

View File

@ -1,4 +0,0 @@
---
title: "Fix v3 api project_hooks POST and PUT operations for build_events"
merge_request: 12673
author: Richard Clamp

View File

@ -1,4 +0,0 @@
---
title: "reset text-align to initial to let elements with dir="auto" align texts to right in RTL languages ( default is left )"
merge_request: 12892
author: goshhob

View File

@ -2,5 +2,5 @@
title: Allow to use same periods for different housekeeping tasks (effectively
skipping the lesser task)
merge_request: 13711
author: @cernvcs
author: cernvcs
type: added

View File

@ -1,4 +0,0 @@
---
title: Handle unsubscribe from email notifications via replying to reply+%{key}+unsubscribe@ address
merge_request: 6597
author:

View File

@ -1,4 +0,0 @@
---
title: Refactor Timelogs structure to use foreign keys.
merge_request: 8769
author:

View File

@ -1,4 +0,0 @@
---
title: "Correction to documention for manual steps on the Jobs API"
merge_request: 11411
author: Zac Sturgess

View File

@ -1,3 +0,0 @@
---
title: "Fix API to serve binary diffs that are treated as text."
merge_request: 14038

View File

@ -1,5 +1,5 @@
---
title: Add GitLab-Pages version to Admin Dashboard
merge_request: 14040
author: @travismiller
author: travismiller
type: added

View File

@ -1,4 +0,0 @@
---
title: Added mock deployment and monitoring service with environments fixtures
merge_request:
author:

View File

@ -0,0 +1,5 @@
---
title: Detect when changelog entries are invalid
merge_request:
author:
type: other

View File

@ -1,4 +0,0 @@
---
title: Added ability to put emojis into repository name
merge_request: 7420
author: Vincent Composieux

22
scripts/lint-changelog-yaml Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env ruby
require 'yaml'
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
end
end
if invalid_changelogs.any?
puts "Invalid changelogs found!\n"
puts invalid_changelogs.sort
exit 1
else
puts "All changelogs are valid YAML.\n"
exit 0
end

View File

@ -13,7 +13,8 @@ tasks = [
%w[yarn run eslint],
%w[bundle exec rubocop --require rubocop-rspec],
%w[scripts/lint-conflicts.sh],
%w[bundle exec rake gettext:lint]
%w[bundle exec rake gettext:lint],
%w[scripts/lint-changelog-yaml]
]
failed_tasks = tasks.reduce({}) do |failures, task|