diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-02 06:16:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-02 06:16:03 +0300 |
commit | c6c6f0d0995a269fce828807a2081a122411bf60 (patch) | |
tree | 4ecf2fb7b4c24f3af67e45b89fa69a3ee4023280 /app/services/protected_branches | |
parent | 6922dc498da47a6612bec722e1fb658b45b427b0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/protected_branches')
-rw-r--r-- | app/services/protected_branches/base_service.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/protected_branches/base_service.rb b/app/services/protected_branches/base_service.rb index 0ab46bf236c..62d5e04b499 100644 --- a/app/services/protected_branches/base_service.rb +++ b/app/services/protected_branches/base_service.rb @@ -18,9 +18,20 @@ module ProtectedBranches def refresh_cache CacheService.new(@project_or_group, @current_user, @params).refresh + refresh_cache_for_groups_projects rescue StandardError => e Gitlab::ErrorTracking.track_exception(e) end + + private + + def refresh_cache_for_groups_projects + return unless @project_or_group.is_a?(Group) + + @project_or_group.all_projects.find_each do |project| + CacheService.new(project, @current_user, @params).refresh + end + end end end |