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
Boxiang Sun
gitlab-ce
Commits
bb5f0671
Commit
bb5f0671
authored
Jul 13, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to ref_name so it's aligning with API
parent
33368281
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/projects/artifacts_controller.rb
app/controllers/projects/artifacts_controller.rb
+2
-2
config/routes.rb
config/routes.rb
+2
-2
No files found.
app/controllers/projects/artifacts_controller.rb
View file @
bb5f0671
...
@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
...
@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
end
def
build_from_ref
def
build_from_ref
if
params
[
:ref
]
if
params
[
:ref
_name
]
builds
=
project
.
builds_for
(
params
[
:build_name
],
params
[
:ref
])
builds
=
project
.
builds_for
(
params
[
:build_name
],
params
[
:ref
_name
])
builds
.
success
.
latest
.
first
builds
.
success
.
latest
.
first
end
end
...
...
config/routes.rb
View file @
bb5f0671
...
@@ -735,8 +735,8 @@ Rails.application.routes.draw do
...
@@ -735,8 +735,8 @@ Rails.application.routes.draw do
resources
:artifacts
,
only:
[]
do
resources
:artifacts
,
only:
[]
do
collection
do
collection
do
get
:search
,
path:
':ref/:build_name/*path'
,
format:
false
,
get
:search
,
path:
':ref
_name
/:build_name/*path'
,
format:
false
,
constraints:
{
ref:
/.+/
}
# ref could have /
constraints:
{
ref
_name
:
/.+/
}
# ref could have /
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