Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5941f3a7
Commit
5941f3a7
authored
Sep 06, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement `Project#has_ci?`
parent
82ed2a09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/models/project.rb
app/models/project.rb
+4
-0
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+1
-1
No files found.
app/models/project.rb
View file @
5941f3a7
...
...
@@ -1389,6 +1389,10 @@ class Project < ActiveRecord::Base
Gitlab
::
Utils
.
slugify
(
full_path
.
to_s
)
end
def
has_ci?
@repository
.
gitlab_ci_yml
||
@project
.
auto_devops_enabled?
end
def
predefined_variables
[
{
key:
'CI_PROJECT_ID'
,
value:
id
.
to_s
,
public:
true
},
...
...
app/views/projects/pipelines/index.html.haml
View file @
5941f3a7
...
...
@@ -14,7 +14,7 @@
"finished-path"
=>
project_pipelines_path
(
@project
,
scope: :finished
),
"branches-path"
=>
project_pipelines_path
(
@project
,
scope: :branches
),
"tags-path"
=>
project_pipelines_path
(
@project
,
scope: :tags
),
"has-ci"
=>
@
repository
.
gitlab_ci_yml
||
@project
.
auto_devops_enabled
?
,
"has-ci"
=>
@
project
.
has_ci
?
,
"ci-lint-path"
=>
ci_lint_path
}
}
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
...
...
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