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
Léo-Paul Géneau
gitlab-ce
Commits
e5e4cd96
Commit
e5e4cd96
authored
Mar 29, 2018
by
Jacob Vosmaer (GitLab)
Committed by
Sean McGivern
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitlab-workhorse still needs RepoPath on Git HTTP
parent
f4ca6e9a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+9
-10
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+3
-0
No files found.
lib/gitlab/workhorse.rb
View file @
e5e4cd96
...
...
@@ -21,20 +21,19 @@ module Gitlab
raise
"Unsupported action:
#{
action
}
"
unless
ALLOWED_GIT_HTTP_ACTIONS
.
include?
(
action
.
to_s
)
project
=
repository
.
project
params
=
{
{
GL_ID
:
Gitlab
::
GlId
.
gl_id
(
user
),
GL_REPOSITORY
:
Gitlab
::
GlRepository
.
gl_repository
(
project
,
is_wiki
),
GL_USERNAME
:
user
&
.
username
,
ShowAllRefs
:
show_all_refs
}
server
=
{
ShowAllRefs
:
show_all_refs
,
Repository
:
repository
.
gitaly_repository
.
to_h
,
RepoPath
:
'ignored but not allowed to be empty in gitlab-workhorse'
,
GitalyServer
:
{
address:
Gitlab
::
GitalyClient
.
address
(
project
.
repository_storage
),
token:
Gitlab
::
GitalyClient
.
token
(
project
.
repository_storage
)
}
params
[
:Repository
]
=
repository
.
gitaly_repository
.
to_h
params
[
:GitalyServer
]
=
server
params
}
end
def
artifact_upload_ok
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
e5e4cd96
...
...
@@ -275,12 +275,14 @@ describe Gitlab::Workhorse do
describe
'.git_http_ok'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:repo_path
)
{
'ignored but not allowed to be empty in gitlab-workhorse'
}
let
(
:action
)
{
'info_refs'
}
let
(
:params
)
do
{
GL_ID
:
"user-
#{
user
.
id
}
"
,
GL_USERNAME
:
user
.
username
,
GL_REPOSITORY
:
"project-
#{
project
.
id
}
"
,
RepoPath
:
repo_path
,
ShowAllRefs
:
false
}
end
...
...
@@ -295,6 +297,7 @@ describe Gitlab::Workhorse do
GL_ID
:
"user-
#{
user
.
id
}
"
,
GL_USERNAME
:
user
.
username
,
GL_REPOSITORY
:
"wiki-
#{
project
.
id
}
"
,
RepoPath
:
repo_path
,
ShowAllRefs
:
false
}
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