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
95faf5f5
Commit
95faf5f5
authored
Mar 29, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new registry path class to match repository project
parent
85847988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
container_repository.rb
app/models/container_repository.rb
+2
-14
No files found.
app/models/container_repository.rb
View file @
95faf5f5
...
...
@@ -62,19 +62,7 @@ class ContainerRepository < ActiveRecord::Base
# TODO, we will return a new ContainerRepository object here
#
def
self
.
project_from_path
(
repository_path
)
return
unless
repository_path
.
include?
(
'/'
)
##
# Projects are always located inside a namespace, so we can remove
# the last node, and see if project with that path exists.
#
truncated_path
=
repository_path
.
slice
(
0
...
repository_path
.
rindex
(
'/'
))
##
# We still make it possible to search projects by a full image path
# in order to maintain backwards compatibility.
#
Project
.
find_by_full_path
(
truncated_path
)
||
Project
.
find_by_full_path
(
repository_path
)
ContainerRegistry
::
Path
.
new
(
repository_path
)
.
repository_project
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