List all commits
curl --request GET \
--url https://gogs.example.com/api/v1/repos/{owner}/{repo}/commits \
--header 'Authorization: <api-key>'[
{
"url": "<string>",
"sha": "<string>",
"html_url": "<string>",
"commit": {
"url": "<string>",
"message": "<string>",
"author": {
"name": "<string>",
"email": "<string>",
"date": "<string>"
},
"committer": {
"name": "<string>",
"email": "<string>",
"date": "<string>"
},
"tree": {
"url": "<string>",
"sha": "<string>"
}
},
"author": {
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"committer": {
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"parents": [
{
"url": "<string>",
"sha": "<string>"
}
]
}
]Repositories
List all commits
Returns commits from the HEAD of the default branch.
GET
/
repos
/
{owner}
/
{repo}
/
commits
List all commits
curl --request GET \
--url https://gogs.example.com/api/v1/repos/{owner}/{repo}/commits \
--header 'Authorization: <api-key>'[
{
"url": "<string>",
"sha": "<string>",
"html_url": "<string>",
"commit": {
"url": "<string>",
"message": "<string>",
"author": {
"name": "<string>",
"email": "<string>",
"date": "<string>"
},
"committer": {
"name": "<string>",
"email": "<string>",
"date": "<string>"
},
"tree": {
"url": "<string>",
"sha": "<string>"
}
},
"author": {
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"committer": {
"id": 123,
"username": "<string>",
"login": "<string>",
"full_name": "<string>",
"email": "jsmith@example.com",
"avatar_url": "<string>"
},
"parents": [
{
"url": "<string>",
"sha": "<string>"
}
]
}
]Authorizations
Personal access token. Use format: token {YOUR_ACCESS_TOKEN}
Query Parameters
Number of commits to return