Skip to main content
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": "[email protected]",
      "avatar_url": "<string>"
    },
    "committer": {
      "id": 123,
      "username": "<string>",
      "login": "<string>",
      "full_name": "<string>",
      "email": "[email protected]",
      "avatar_url": "<string>"
    },
    "parents": [
      {
        "url": "<string>",
        "sha": "<string>"
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Owner of the repository

repo
string
required

Name of the repository

Query Parameters

pageSize
integer
default:30

Number of commits to return

Response

Success

url
string
sha
string
html_url
string
commit
object
author
object
committer
object
parents
object[]