curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number}const options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number}', 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/{number}"
response = requests.get(url)
print(response.text){
"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>",
"can_merge": true,
"can_decline": true,
"can_withdraw": true,
"can_talk": true
}{
"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>"
}
}A change request
With what you can do with it (can_merge, can_decline, can_withdraw, can_talk). from is this repo itself for one of its own branches, which whoever opened it withdraws and the rest of its org declines.
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number}const options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number}', 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/{number}"
response = requests.get(url)
print(response.text){
"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>",
"can_merge": true,
"can_decline": true,
"can_withdraw": true,
"can_talk": true
}{
"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>"
}
}Path Parameters
"patch"
"demo-mod"
x >= 112
Response
The request
12
"Port to 26.5"
open: waiting on the repo's owner. merged: its commits are in the branch it was for. declined: the owner turned it down. withdrawn: its author took it back.
open, merged, declined, withdrawn The repo its branch is in, as owner/slug: the fork it comes from, or this repo itself for one of its own branches. Null if you can't reach the fork.
"kai/sky-mod"
The branch it offers, in from
"port-26.5"
The branch it would change in this repo
"26.5"
Its latest commit, as copied into this repo, where a clone doesn't see it: git fetch <clone_url> <head_commit> gets its commits while it's open.
What stopped the latest push to its branch being copied, which stays out of the request until it's fixed: a refusal, a fork that isn't open, which copies when it opens, or a copy that failed, which a new push tries again. Empty says nothing has stopped one, and a copy may still be on its way.
Who opened it: their username
"kai"
Posts in its talk
Who merged, declined or withdrew it: their username
The commit its branch was at after the merge.
Whether you can merge it: you're in the repo's org, and it's open.
Whether you can decline it: you're in the repo's org, and it's open.
Whether you can withdraw it: you offer it, and it's open.
Whether you can post in its talk: you're signed in.