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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
94105993
Commit
94105993
authored
Sep 21, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scope environments to project
parent
29a64950
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+4
-0
app/models/project.rb
app/models/project.rb
+1
-1
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+1
-1
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
.../views/projects/merge_requests/_heading.html.haml_spec.rb
+2
-0
No files found.
app/helpers/gitlab_routing_helper.rb
View file @
94105993
...
...
@@ -70,6 +70,10 @@ module GitlabRoutingHelper
namespace_project_runner_path
(
@project
.
namespace
,
@project
,
runner
,
*
args
)
end
def
environment_path
(
environment
,
*
args
)
namespace_project_environment_path
(
environment
.
project
.
namespace
,
environment
.
project
,
environment
,
*
args
)
end
def
issue_path
(
entity
,
*
args
)
namespace_project_issue_path
(
entity
.
project
.
namespace
,
entity
.
project
,
entity
,
*
args
)
end
...
...
app/models/project.rb
View file @
94105993
...
...
@@ -1304,7 +1304,7 @@ class Project < ActiveRecord::Base
environment_ids
.
where
(
ref:
ref
)
end
Environment
.
where
(
id:
environment_ids
).
select
do
|
environment
|
environments
.
where
(
id:
environment_ids
).
select
do
|
environment
|
environment
.
includes_commit?
(
commit
)
end
end
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
94105993
...
...
@@ -51,7 +51,7 @@
%span
.hidden-sm
Deployed to
=
succeed
'.'
do
=
link_to
environment
.
name
,
namespace_project_environment_path
(
environment
.
project
.
namespace
,
environment
.
project
,
environment
),
class:
'environment'
=
link_to
environment
.
name
,
environment_path
(
environment
),
class:
'environment'
-
external_url
=
environment
.
external_url
-
if
external_url
=
link_to
external_url
,
target:
'_blank'
do
...
...
spec/views/projects/merge_requests/_heading.html.haml_spec.rb
View file @
94105993
...
...
@@ -15,6 +15,8 @@ describe 'projects/merge_requests/widget/_heading' do
assign
(
:merge_request
,
merge_request
)
assign
(
:project
,
project
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
render
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