A repo's change requests
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requestsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests', 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}/change-requests"
response = requests.get(url)
print(response.text){
"data": [
{
"number": 12,
"title": "Port to 26.5",
"description": "<string>",
"state": "open",
"from": "kai/sky-mod",
"branch": "port-26.5",
"into": "26.5",
"head_commit": "<string>",
"problems": [
"<string>"
],
"author": "kai",
"talk_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"merge_commit": "<string>",
"up_to_date": true,
"flagged": 123
}
],
"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>"
}
}Change requests
A repo's change requests
Newest first: the open ones unless you ask for another state, or all. Each says whether it’s up to date (up_to_date) and how much Patch’s review flagged (flagged, null for one from the repo’s own branch, which the review doesn’t read), so a list doesn’t need a diff per row. up_to_date counts once against repo_diff for the whole page, and only a page’s first 25 open requests have one: past that limit or those 25, or when the repo can’t say just now, it’s null and the list still answers.
GET
/
projects
/
{owner}
/
{slug}
/
change-requests
A repo's change requests
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requestsconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests', 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}/change-requests"
response = requests.get(url)
print(response.text){
"data": [
{
"number": 12,
"title": "Port to 26.5",
"description": "<string>",
"state": "open",
"from": "kai/sky-mod",
"branch": "port-26.5",
"into": "26.5",
"head_commit": "<string>",
"problems": [
"<string>"
],
"author": "kai",
"talk_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"merge_commit": "<string>",
"up_to_date": true,
"flagged": 123
}
],
"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>"
}
}Query Parameters
Available options:
open, merged, declined, withdrawn, all Required range:
1 <= x <= 100The next_cursor from the previous page
Maximum string length:
500