diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-02 21:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-02 21:08:56 +0300 |
commit | e72b53e81e9913fc799375326b088ddcd407bcea (patch) | |
tree | 411c977739a635949c83fb312195ee5d75227d90 /app/services/git | |
parent | 62f486eb359932d8ec32ee6456148f9c477c52e9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/git')
-rw-r--r-- | app/services/git/branch_hooks_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/git/branch_hooks_service.rb b/app/services/git/branch_hooks_service.rb index dcb32b4c84b..93a0d139001 100644 --- a/app/services/git/branch_hooks_service.rb +++ b/app/services/git/branch_hooks_service.rb @@ -76,12 +76,20 @@ module Git def branch_change_hooks enqueue_process_commit_messages enqueue_jira_connect_sync_messages + enqueue_metrics_dashboard_sync end def branch_remove_hooks project.repository.after_remove_branch(expire_cache: false) end + def enqueue_metrics_dashboard_sync + return unless Feature.enabled?(:sync_metrics_dashboards, project) + return unless default_branch? + + ::Metrics::Dashboard::SyncDashboardsWorker.perform_async(project.id) + end + # Schedules processing of commit messages def enqueue_process_commit_messages referencing_commits = limited_commits.select(&:matches_cross_reference_regex?) |