Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
0f9483a37e33
Commit
ca6fd0a2
authored
Sep 21, 2015
by
Kamil Trzcinski
Browse files
Fixed MR handling when GitLab CI project is not present
parent
fd0dbee5725c
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/models/project_services/gitlab_ci_service.rb
View file @
0f9483a3
...
...
@@ -46,7 +46,9 @@ def execute(data)
end
ci_project
=
Ci
::
Project
.
find_by
(
gitlab_id:
project
.
id
)
Ci
::
CreateCommitService
.
new
.
execute
(
ci_project
,
data
)
if
ci_project
Ci
::
CreateCommitService
.
new
.
execute
(
ci_project
,
data
)
end
end
def
get_ci_commit
(
sha
,
ref
)
...
...
@@ -85,7 +87,9 @@ def commit_coverage(sha, ref)
end
def
build_page
(
sha
,
ref
)
Ci
::
RoutesHelper
.
ci_project_ref_commits_path
(
project
.
gitlab_ci_project
,
ref
,
sha
)
if
project
.
gitlab_ci_project
.
present?
Ci
::
RoutesHelper
.
ci_project_ref_commits_path
(
project
.
gitlab_ci_project
,
ref
,
sha
)
end
end
def
title
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
0f9483a3
...
...
@@ -10,7 +10,8 @@
%span
CI build
#{
status
}
for
#{
@merge_request
.
last_commit_short_sha
}
.
%span
.ci-coverage
=
link_to
"View build details"
,
ci_build_details_path
(
@merge_request
),
:"data-no-turbolink"
=>
"data-no-turbolink"
-
if
ci_build_details_path
(
@merge_request
)
=
link_to
"View build details"
,
ci_build_details_path
(
@merge_request
),
:"data-no-turbolink"
=>
"data-no-turbolink"
.ci_widget
=
icon
(
"spinner spin"
)
...
...
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