BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
46bdcd64
Commit
46bdcd64
authored
Sep 13, 2017
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-auto-devops-banner' into 'master'
AutoDevOps banner hidden on explicit CI config Closes #37652 See merge request !14207
parents
d4303f82
69f7a12f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
auto_devops_helper.rb
app/helpers/auto_devops_helper.rb
+3
-1
zj-auto-devops-banner.yml
changelogs/unreleased/zj-auto-devops-banner.yml
+6
-0
auto_devops_helper_spec.rb
spec/helpers/auto_devops_helper_spec.rb
+16
-0
No files found.
app/helpers/auto_devops_helper.rb
View file @
46bdcd64
...
@@ -3,6 +3,8 @@ module AutoDevopsHelper
...
@@ -3,6 +3,8 @@ module AutoDevopsHelper
Feature
.
get
(
:auto_devops_banner_disabled
).
off?
&&
Feature
.
get
(
:auto_devops_banner_disabled
).
off?
&&
show_callout?
(
'auto_devops_settings_dismissed'
)
&&
show_callout?
(
'auto_devops_settings_dismissed'
)
&&
can?
(
current_user
,
:admin_pipeline
,
project
)
&&
can?
(
current_user
,
:admin_pipeline
,
project
)
&&
project
.
has_auto_devops_implicitly_disabled?
project
.
has_auto_devops_implicitly_disabled?
&&
!
project
.
repository
.
gitlab_ci_yml
&&
project
.
ci_services
.
active
.
none?
end
end
end
end
changelogs/unreleased/zj-auto-devops-banner.yml
0 → 100644
View file @
46bdcd64
---
title
:
Do not show the Auto DevOps banner when the project has a .gitlab-ci.yml on
master
merge_request
:
author
:
type
:
fixed
spec/helpers/auto_devops_helper_spec.rb
View file @
46bdcd64
...
@@ -65,5 +65,21 @@ describe AutoDevopsHelper do
...
@@ -65,5 +65,21 @@ describe AutoDevopsHelper do
it
{
is_expected
.
to
eq
(
false
)
}
it
{
is_expected
.
to
eq
(
false
)
}
end
end
context
'when master contains a .gitlab-ci.yml file'
do
before
do
allow
(
project
.
repository
).
to
receive
(
:gitlab_ci_yml
).
and_return
(
"script: ['test']"
)
end
it
{
is_expected
.
to
eq
(
false
)
}
end
context
'when another service is enabled'
do
before
do
create
(
:service
,
project:
project
,
category: :ci
,
active:
true
)
end
it
{
is_expected
.
to
eq
(
false
)
}
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment