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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
88749476
Commit
88749476
authored
Oct 12, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix commit status POST URL
parent
914cfbd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/api/commit_statuses.rb
lib/api/commit_statuses.rb
+1
-1
spec/requests/api/commit_status_spec.rb
spec/requests/api/commit_status_spec.rb
+3
-3
No files found.
lib/api/commit_statuses.rb
View file @
88749476
...
...
@@ -41,7 +41,7 @@ module API
# description (optional) - A short description of the status
# name or context (optional) - A string label to differentiate this status from the status of other systems. Default: "default"
# Examples:
# POST /projects/:id/
repository/commits/:sha/status
# POST /projects/:id/
statuses/:sha
post
':id/statuses/:sha'
do
required_attributes!
[
:state
]
attrs
=
attributes_for_keys
[
:ref
,
:target_url
,
:description
,
:context
,
:name
]
...
...
spec/requests/api/commit_status_spec.rb
View file @
88749476
...
...
@@ -72,8 +72,8 @@ describe API::API, api: true do
end
end
describe
'POST /projects/:id/
repository/commits/:sha/status
'
do
let
(
:post_url
)
{
"/projects/
#{
project
.
id
}
/
repository/commits/
#{
commit
.
id
}
/status
"
}
describe
'POST /projects/:id/
statuses/:sha
'
do
let
(
:post_url
)
{
"/projects/
#{
project
.
id
}
/
statuses/
#{
commit
.
id
}
"
}
context
'reporter user'
do
context
'should create commit status'
do
...
...
@@ -112,7 +112,7 @@ describe API::API, api: true do
end
it
'invalid commit'
do
post
api
(
"/projects/
#{
project
.
id
}
/
repository/commits/invalid_sha/status
"
,
user
),
state:
'running'
post
api
(
"/projects/
#{
project
.
id
}
/
statuses/invalid_sha
"
,
user
),
state:
'running'
expect
(
response
.
status
).
to
eq
(
404
)
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