Create a commit comment
POST {{baseUrl}}/repos/:owner/:repo/commits/:commit_sha/comments
Create a comment for a commit using its :commit_sha
.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See [Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)
and [Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)
for details.
Request Body
{"body"=>"<string>", "path"=>"<string>", "position"=>"<integer>", "line"=>"<integer>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"html_url":"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1","url":"https://api.github.com/repos/octocat/Hello-World/comments/1","id":1,"node_id":"MDEzOkNvbW1pdENvbW1lbnQx","body":"Great stuff","path":"file1.txt","position":4,"line":14,"commit_id":"6dcb09b5b57875f334f61aebed695e2e4193db5e","author_association":"collaborator","user":{"login":"octocat","id":1,"node_id":"MDQ6VXNlcjE=","avatar_url":"https://github.com/images/error/octocat_happy.gif","gravatar_id":"","url":"https://api.github.com/users/octocat","html_url":"https://github.com/octocat","followers_url":"https://api.github.com/users/octocat/followers","following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","organizations_url":"https://api.github.com/users/octocat/orgs","repos_url":"https://api.github.com/users/octocat/repos","events_url":"https://api.github.com/users/octocat/events{/privacy}","received_events_url":"https://api.github.com/users/octocat/received_events","type":"User","site_admin":false},"created_at":"2011-04-14T16:00:49Z","updated_at":"2011-04-14T16:00:49Z"}