diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:08 +0300 |
commit | 946771d0b016ae92b15a60bc3290a33b94191ffe (patch) | |
tree | 64862c2433989483f5fce45d5539242577a362eb /lib/gitlab/checks | |
parent | f1e2fca19a90a6992c2020cf8c2159cfb0b61bca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r-- | lib/gitlab/checks/snippet_check.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/checks/snippet_check.rb b/lib/gitlab/checks/snippet_check.rb index be25fe3e7c4..8bb6c576204 100644 --- a/lib/gitlab/checks/snippet_check.rb +++ b/lib/gitlab/checks/snippet_check.rb @@ -3,6 +3,7 @@ module Gitlab module Checks class SnippetCheck < BaseChecker + DEFAULT_BRANCH = 'master'.freeze ERROR_MESSAGES = { create_delete_branch: 'You can not create or delete branches.' }.freeze @@ -29,6 +30,12 @@ module Gitlab true end + + private + + def creation? + @branch_name != DEFAULT_BRANCH && super + end end end end |