A repo's history
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commitsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commits"
response = requests.get(url)
print(response.text){
"data": [
{
"hash": "<string>",
"message": "<string>",
"parents": [
"<string>"
],
"author": {
"name": "<string>",
"email": "<string>"
},
"committer": {
"name": "<string>",
"email": "<string>"
},
"authored_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Repos
A repo's history
From a branch, tag or commit, newest first, along each commit’s first parent. Each row has its subject and not its whole message: /repo/commit has that. A page has no more than its limit, and can have fewer along a history with many merges. next_cursor holds the commit the next page starts from, so pushes in between don’t shift it. 404 ref_not_found.
GET
/
projects
/
{owner}
/
{slug}
/
repo
/
commits
A repo's history
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commitsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/repo/commits"
response = requests.get(url)
print(response.text){
"data": [
{
"hash": "<string>",
"message": "<string>",
"parents": [
"<string>"
],
"author": {
"name": "<string>",
"email": "<string>"
},
"committer": {
"name": "<string>",
"email": "<string>"
},
"authored_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Query Parameters
A branch, a tag or a full commit hash: the default branch unless you say. A branch comes before a tag of the same name, and refs/tags/v1 says which.
Pattern:
^\S{1,255}$Example:
"main"
Required range:
1 <= x <= 100The next_cursor from the previous page
Maximum string length:
500