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/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 03:09:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 03:09:09 +0300
commit47ebeef9122af96dc1fcd5c8e1ca0091f62fa113 (patch)
treef140bf150d6670b734e981851070e73c270fc45f /app
parent06bb4eba7828ce59fde366734828458c037059b4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/graphql/gitlab_schema.rb1
-rw-r--r--app/models/commit.rb2
-rw-r--r--app/models/users_statistics.rb14
3 files changed, 16 insertions, 1 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb
index 5a4a223093e..b81996cf378 100644
--- a/app/graphql/gitlab_schema.rb
+++ b/app/graphql/gitlab_schema.rb
@@ -16,6 +16,7 @@ class GitlabSchema < GraphQL::Schema
use Gitlab::Graphql::CallsGitaly
use Gitlab::Graphql::Connections
use Gitlab::Graphql::GenericTracing
+ use Gitlab::Graphql::Timeout, max_seconds: Gitlab.config.gitlab.graphql_timeout
query_analyzer Gitlab::Graphql::QueryAnalyzers::LoggerAnalyzer.new
query_analyzer Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer.new
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 8068c4a07a2..2b8e4aa8278 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -415,7 +415,7 @@ class Commit
end
def has_been_reverted?(current_user, notes_association = nil)
- ext = all_references(current_user)
+ ext = Gitlab::ReferenceExtractor.new(project, current_user)
notes_association ||= notes_with_associations
notes_association.system.each do |note|
diff --git a/app/models/users_statistics.rb b/app/models/users_statistics.rb
new file mode 100644
index 00000000000..5c5f62d5d87
--- /dev/null
+++ b/app/models/users_statistics.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class UsersStatistics < ApplicationRecord
+ STATISTICS_NAMES = [
+ :without_groups_and_projects,
+ :with_highest_role_guest,
+ :with_highest_role_reporter,
+ :with_highest_role_developer,
+ :with_highest_role_maintainer,
+ :with_highest_role_owner,
+ :bots,
+ :blocked
+ ].freeze
+end