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
63fcf137
Commit
63fcf137
authored
Jan 03, 2017
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Commits API to accept a Project path upon POST
parent
de25604f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
changelogs/unreleased/26261-post-api-v3-projects-idorproject-commits-commits-does-not-work-with-project-path.yml
...oject-commits-commits-does-not-work-with-project-path.yml
+4
-0
lib/api/commits.rb
lib/api/commits.rb
+0
-1
spec/requests/api/commits_spec.rb
spec/requests/api/commits_spec.rb
+10
-0
No files found.
changelogs/unreleased/26261-post-api-v3-projects-idorproject-commits-commits-does-not-work-with-project-path.yml
0 → 100644
View file @
63fcf137
---
title
:
Fix Commits API to accept a Project path upon POST
merge_request
:
author
:
lib/api/commits.rb
View file @
63fcf137
...
...
@@ -44,7 +44,6 @@ module API
detail
'This feature was introduced in GitLab 8.13'
end
params
do
requires
:id
,
type:
Integer
,
desc:
'The project ID'
requires
:branch_name
,
type:
String
,
desc:
'The name of branch'
requires
:commit_message
,
type:
String
,
desc:
'Commit message'
requires
:actions
,
type:
Array
[
Hash
],
desc:
'Actions to perform in commit'
...
...
spec/requests/api/commits_spec.rb
View file @
63fcf137
...
...
@@ -146,6 +146,16 @@ describe API::Commits, api: true do
expect
(
response
).
to
have_http_status
(
400
)
end
context
'with project path in URL'
do
let
(
:url
)
{
"/projects/
#{
project
.
namespace
.
path
}
%2F
#{
project
.
path
}
/repository/commits"
}
it
'a new file in project repo'
do
post
api
(
url
,
user
),
valid_c_params
expect
(
response
).
to
have_http_status
(
201
)
end
end
end
context
:delete
do
...
...
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