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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a929380b
Commit
a929380b
authored
Jan 18, 2021
by
Mathieu Parent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove "incoming/" section from the debian upload route
See
https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/343
parent
226b0c20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lib/api/debian_project_packages.rb
lib/api/debian_project_packages.rb
+3
-3
spec/requests/api/debian_project_packages_spec.rb
spec/requests/api/debian_project_packages_spec.rb
+4
-4
No files found.
lib/api/debian_project_packages.rb
View file @
a929380b
...
...
@@ -20,10 +20,10 @@ module API
requires
:file_name
,
type:
String
,
desc:
'The file name'
end
namespace
'
incoming/
:file_name'
,
requirements:
FILE_NAME_REQUIREMENTS
do
namespace
':file_name'
,
requirements:
FILE_NAME_REQUIREMENTS
do
content_type
:json
,
Gitlab
::
Workhorse
::
INTERNAL_API_CONTENT_TYPE
# PUT {projects|groups}/:id/packages/debian/
incoming/
:file_name
# PUT {projects|groups}/:id/packages/debian/:file_name
params
do
requires
:file
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
'The package file to be published (generated by Multipart middleware)'
end
...
...
@@ -42,7 +42,7 @@ module API
forbidden!
end
# PUT {projects|groups}/:id/packages/debian/
incoming/
:file_name/authorize
# PUT {projects|groups}/:id/packages/debian/:file_name/authorize
route_setting
:authentication
,
deploy_token_allowed:
true
,
basic_auth_personal_access_token:
true
,
job_token_allowed: :basic_auth
put
'authorize'
do
authorize_workhorse!
(
...
...
spec/requests/api/debian_project_packages_spec.rb
View file @
a929380b
...
...
@@ -36,16 +36,16 @@ RSpec.describe API::DebianProjectPackages do
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO File'
end
describe
'PUT projects/:id/packages/debian/
incoming/
:file_name'
do
describe
'PUT projects/:id/packages/debian/:file_name'
do
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
incoming/
#{
file_name
}
"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
#{
file_name
}
"
}
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
end
describe
'PUT projects/:id/packages/debian/
incoming/
:file_name/authorize'
do
describe
'PUT projects/:id/packages/debian/:file_name/authorize'
do
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
incoming/
#{
file_name
}
/authorize"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/
#{
file_name
}
/authorize"
}
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
,
is_authorize:
true
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