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
dd8afbf0
Commit
dd8afbf0
authored
Aug 25, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just use instance variable instead, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_14400736
parent
6953d988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
artifacts_controller.rb
app/controllers/projects/artifacts_controller.rb
+2
-7
No files found.
app/controllers/projects/artifacts_controller.rb
View file @
dd8afbf0
...
...
@@ -37,8 +37,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def
latest_succeeded
path
=
ref_name_and_path
.
last
target_path
=
artifacts_action_path
(
path
,
project
,
build
)
target_path
=
artifacts_action_path
(
@path
,
project
,
build
)
if
target_path
redirect_to
(
target_path
)
...
...
@@ -63,17 +62,13 @@ class Projects::ArtifactsController < Projects::ApplicationController
def
build_from_ref
if
params
[
:ref_name_and_path
]
ref_name
=
ref_name_and_path
.
first
ref_name
,
@path
=
extract_ref
(
params
[
:ref_name_and_path
])
builds
=
project
.
latest_successful_builds_for
(
ref_name
)
builds
.
find_by
(
name:
params
[
:job
])
end
end
def
ref_name_and_path
@ref_name_and_path
||=
extract_ref
(
params
[
:ref_name_and_path
])
end
def
artifacts_file
@artifacts_file
||=
build
.
artifacts_file
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