diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-26 21:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-26 21:09:30 +0300 |
commit | 25eb713a7fdb787a67d74a88a89433839aab5642 (patch) | |
tree | 43cfe6c45530aedfd7f96d6c6d0e5857ce1d5ee3 /app/services/git | |
parent | ff89c3c372cd3b317915fb21940f9c8c065d94c0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/git')
-rw-r--r-- | app/services/git/wiki_push_service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/git/wiki_push_service.rb b/app/services/git/wiki_push_service.rb index 87e2be858c0..99659bc8ab2 100644 --- a/app/services/git/wiki_push_service.rb +++ b/app/services/git/wiki_push_service.rb @@ -16,6 +16,7 @@ module Git wiki.after_post_receive process_changes + perform_housekeeping if Feature.enabled?(:wiki_housekeeping, wiki.container) end private @@ -72,6 +73,14 @@ module Git def default_branch_changes @default_branch_changes ||= changes.select { |change| on_default_branch?(change) } end + + def perform_housekeeping + housekeeping = Repositories::HousekeepingService.new(wiki) + housekeeping.increment! + housekeeping.execute if housekeeping.needed? + rescue Repositories::HousekeepingService::LeaseTaken + # no-op + end end end |