diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2018-12-13 22:26:56 +0300 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2019-02-27 13:52:35 +0300 |
commit | 5ae9a44aa17c8929627cc450f936cd960c143e25 (patch) | |
tree | 6a14d388f5687979a683d443868b4297ebc6838c /app/models/project.rb | |
parent | 6fa88ed77e1693cda845efe49bf2c9a77aed2e4f (diff) |
Add project http fetch statistics API
The API get projects/:id/traffic/fetches allows user with write
access to the repository to get the number of clones for the
last 30 days.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index c72d3a3b725..82ef95d975a 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -629,6 +629,10 @@ class Project < ActiveRecord::Base auto_devops&.enabled.nil? && !(Gitlab::CurrentSettings.auto_devops_enabled? || Feature.enabled?(:force_autodevops_on_by_default, self)) end + def daily_statistics_enabled? + Feature.enabled?(:project_daily_statistics, self, default_enabled: true) + end + def empty_repo? repository.empty? end |