Available since 0.11.80
GET /repos/:username/:reponame/commits/:sha
Status: 200 OK
{
"url": "https://try.gogs.io/api/v1/repos/unknwon/demo/commits/dc20792485ffd49b0bca49f90a8d44a16241b84a",
"sha": "dc20792485ffd49b0bca49f90a8d44a16241b84a",
"html_url": "https://try.gogs.io/unknwon/demo/commits/dc20792485ffd49b0bca49f90a8d44a16241b84a",
"commit": {
"url": "https://try.gogs.io/api/v1/repos/unknwon/demo/commits/dc20792485ffd49b0bca49f90a8d44a16241b84a",
"author": {
"name": "unknwon",
"email": "[email protected]",
"date": "2018-12-10T23:51:52-05:00"
},
"committer": {
"name": "unknwon",
"email": "[email protected]",
"date": "2018-12-10T23:51:52-05:00"
},
"message": "Update 'README.md'",
"tree": {
"url": "https://try.gogs.io/api/v1/repos/unknwon/demo/tree/dc20792485ffd49b0bca49f90a8d44a16241b84a",
"sha": "dc20792485ffd49b0bca49f90a8d44a16241b84a"
}
},
"author": {
"id": 1,
"username": "unknwon",
"login": "unknwon",
"full_name": "",
"email": "[email protected]",
"avatar_url": "https://secure.gravatar.com/avatar/d8b2871cdac01b57bbda23716cc03b96"
},
"committer": {
"id": 1,
"username": "unknwon",
"login": "unknwon",
"full_name": "",
"email": "[email protected]",
"avatar_url": "https://secure.gravatar.com/avatar/d8b2871cdac01b57bbda23716cc03b96"
},
"parents": [
{
"url": "https://try.gogs.io/api/v1/unknwon/demo/commits/9227a50146b3fd815fe864af99b984c77d06326a",
"sha": "9227a50146b3fd815fe864af99b984c77d06326a"
}
]
}
Available since 0.11.80
GET /repos/:username/:reponame/commits/:ref
Accept: application/vnd.gogs.sha
It supports either short name (e.g. master
, feature/666
) or full name (e.g. refs/tags/v1.0
, refs/heads/develop
).
Status: 200 OK
dc20792485ffd49b0bca49f90a8d44a16241b84a