curl --request PATCH \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', description: '<string>'})
};
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}"
payload = {
"title": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
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>"
}{
"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 a request's title or description
Whoever offers it (who opened it, and its fork’s org) and the repo’s org. Fields you leave out stay as they are. Needs the publish scope.
curl --request PATCH \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/change-requests/{number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', description: '<string>'})
};
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}"
payload = {
"title": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
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>"
}{
"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>"
}
}Authorizations
An API key (pch_...) or the token from pch login.
Path Parameters
"patch"
"demo-mod"
x >= 112
Body
Response
Updated
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.