diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /app/helpers/learn_gitlab_helper.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'app/helpers/learn_gitlab_helper.rb')
-rw-r--r-- | app/helpers/learn_gitlab_helper.rb | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/app/helpers/learn_gitlab_helper.rb b/app/helpers/learn_gitlab_helper.rb index 421cf84f98c..a07922e451a 100644 --- a/app/helpers/learn_gitlab_helper.rb +++ b/app/helpers/learn_gitlab_helper.rb @@ -21,8 +21,8 @@ module LearnGitlabHelper end def learn_gitlab_onboarding_available?(project) - OnboardingProgress.onboarding?(project.namespace) && - LearnGitlab::Project.new(current_user).available? + Onboarding::Progress.onboarding?(project.namespace) && + Onboarding::LearnGitlab.new(current_user).available? end private @@ -33,10 +33,12 @@ module LearnGitlabHelper action_urls(project).to_h do |action, url| [ action, - url: url, - completed: attributes[OnboardingProgress.column_name(action)].present?, - svg: image_path("learn_gitlab/#{action}.svg"), - enabled: true + { + url: url, + completed: attributes[Onboarding::Progress.column_name(action)].present?, + svg: image_path("learn_gitlab/#{action}.svg"), + enabled: true + } ] end end @@ -70,11 +72,14 @@ module LearnGitlabHelper end def action_issue_urls - LearnGitlab::Onboarding::ACTION_ISSUE_IDS.transform_values { |id| project_issue_url(learn_gitlab_project, id) } + Onboarding::Completion::ACTION_ISSUE_IDS.transform_values do |id| + project_issue_url(learn_gitlab_project, id) + end end def deploy_section_action_urls(project) - experiment(:security_actions_continuous_onboarding, + experiment( + :security_actions_continuous_onboarding, namespace: project.namespace, user: current_user, sticky_to: current_user @@ -91,11 +96,11 @@ module LearnGitlabHelper end def learn_gitlab_project - @learn_gitlab_project ||= LearnGitlab::Project.new(current_user).project + @learn_gitlab_project ||= Onboarding::LearnGitlab.new(current_user).project end def onboarding_progress(project) - OnboardingProgress.find_by(namespace: project.namespace) # rubocop: disable CodeReuse/ActiveRecord + Onboarding::Progress.find_by(namespace: project.namespace) # rubocop: disable CodeReuse/ActiveRecord end end |