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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-28 15:08:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-28 15:08:10 +0300
commita83a97f60432c6c352af80d55339e9fe45b63307 (patch)
tree40a0ef7fb93580a5ef4b5417c27efab9b2d13b72 /lib
parent4c788f43cbcd70bcceb4e40891d329952aa016d0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml7
-rw-r--r--lib/milestone_array.rb42
2 files changed, 3 insertions, 46 deletions
diff --git a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
index 47f68118ee0..ae3809f41e8 100644
--- a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
@@ -83,7 +83,7 @@ brakeman-sast:
$GITLAB_FEATURES =~ /\bsast\b/ &&
$SAST_DEFAULT_ANALYZERS =~ /brakeman/
exists:
- - '**/*.rb'
+ - 'config/routes.rb'
eslint-sast:
extends: .sast-analyzer
@@ -149,7 +149,7 @@ nodejs-scan-sast:
$GITLAB_FEATURES =~ /\bsast\b/ &&
$SAST_DEFAULT_ANALYZERS =~ /nodejs-scan/
exists:
- - '**/*.js'
+ - 'package.json'
phpcs-security-audit-sast:
extends: .sast-analyzer
@@ -213,8 +213,7 @@ sobelow-sast:
$GITLAB_FEATURES =~ /\bsast\b/ &&
$SAST_DEFAULT_ANALYZERS =~ /sobelow/
exists:
- - '**/*.ex'
- - '**/*.exs'
+ - 'mix.exs'
spotbugs-sast:
extends: .sast-analyzer
diff --git a/lib/milestone_array.rb b/lib/milestone_array.rb
deleted file mode 100644
index 461e73e9670..00000000000
--- a/lib/milestone_array.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-module MilestoneArray
- class << self
- def sort(array, sort_method)
- case sort_method
- when 'due_date_asc'
- sort_asc_nulls_last(array, 'due_date')
- when 'due_date_desc'
- sort_desc_nulls_last(array, 'due_date')
- when 'start_date_asc'
- sort_asc_nulls_last(array, 'start_date')
- when 'start_date_desc'
- sort_desc_nulls_last(array, 'start_date')
- when 'name_asc'
- sort_asc(array, 'title')
- when 'name_desc'
- sort_asc(array, 'title').reverse
- else
- array
- end
- end
-
- private
-
- def sort_asc_nulls_last(array, attribute)
- attribute = attribute.to_sym
-
- array.select(&attribute).sort_by(&attribute) + array.reject(&attribute)
- end
-
- def sort_desc_nulls_last(array, attribute)
- attribute = attribute.to_sym
-
- array.select(&attribute).sort_by(&attribute).reverse + array.reject(&attribute)
- end
-
- def sort_asc(array, attribute)
- array.sort_by(&attribute.to_sym)
- end
- end
-end