Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 00:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 00:09:08 +0300
commit7671216b60e2796a050358ff808b4a0c2de3d22f (patch)
tree605dfc1339a3cd7dc7353ac6d725191086a9acca /app/helpers
parentc2367afbf57ebc65d5b78a743b5d6a91f0aece9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/blob_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 77a320f8925..9c09ddafbf1 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -341,4 +341,16 @@ module BlobHelper
edit_fork_button_tag(common_classes, project, text, edit_blob_fork_params(edit_path))
end
end
+
+ def show_suggest_pipeline_creation_celebration?
+ experiment_enabled?(:suggest_pipeline) &&
+ @blob.auxiliary_viewer.valid?(project: @project, sha: @commit.sha, user: current_user) &&
+ @blob.path == Gitlab::FileDetector::PATTERNS[:gitlab_ci] &&
+ @project.uses_default_ci_config? &&
+ cookies[suggest_pipeline_commit_cookie_name].present?
+ end
+
+ def suggest_pipeline_commit_cookie_name
+ "suggest_gitlab_ci_yml_commit_#{@project.id}"
+ end
end