Merge branch 'rs-release-automation-danger' into 'master'
Exempt release automation MRs from Danger rules Closes gitlab-org/release/framework#269 See merge request gitlab-org/gitlab-ce!26993
This commit is contained in:
commit
815901e322
2 changed files with 23 additions and 15 deletions
|
@ -1,4 +1,6 @@
|
|||
danger.import_plugin('danger/plugins/helper.rb')
|
||||
|
||||
unless helper.release_automation?
|
||||
danger.import_dangerfile(path: 'danger/metadata')
|
||||
danger.import_dangerfile(path: 'danger/changes_size')
|
||||
danger.import_dangerfile(path: 'danger/changelog')
|
||||
|
@ -14,3 +16,4 @@ danger.import_dangerfile(path: 'danger/eslint')
|
|||
danger.import_dangerfile(path: 'danger/roulette')
|
||||
danger.import_dangerfile(path: 'danger/single_codebase')
|
||||
danger.import_dangerfile(path: 'danger/gitlab_ui_wg')
|
||||
end
|
||||
|
|
|
@ -7,6 +7,7 @@ require_relative 'teammate'
|
|||
module Gitlab
|
||||
module Danger
|
||||
module Helper
|
||||
RELEASE_TOOLS_BOT = 'gitlab-release-tools-bot'
|
||||
ROULETTE_DATA_URL = URI.parse('https://about.gitlab.com/roulette.json').freeze
|
||||
|
||||
# Returns a list of all files that have been added, modified or renamed.
|
||||
|
@ -40,6 +41,10 @@ module Gitlab
|
|||
ENV['CI_PROJECT_NAME'] == 'gitlab-ee' || File.exist?('../../CHANGELOG-EE.md')
|
||||
end
|
||||
|
||||
def release_automation?
|
||||
gitlab.mr_author == RELEASE_TOOLS_BOT
|
||||
end
|
||||
|
||||
def project_name
|
||||
ee? ? 'gitlab-ee' : 'gitlab-ce'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue