How a pull request on a connected repo stands
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/github/pulls/{number} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/github/pulls/{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}/github/pulls/{number}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"number": 12,
"url": "<string>",
"title": "<string>",
"head": "sky-boost",
"base": "main",
"state": "open",
"merged_at": "<string>",
"mergeable": 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>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}GitHub
How a pull request on a connected repo stands
state says whether it’s open, closed or merged. For a member of the project’s org who can push to its GitHub repo, as they are on GitHub. 403 github_not_linked without a connected GitHub account, github_no_push without push on the repo, and github_no_access when Patch’s GitHub App can’t reach it, or hasn’t got what this needs, with where to accept that in details.settings_url; 404 gone_from_github.
GET
/
projects
/
{owner}
/
{slug}
/
github
/
pulls
/
{number}
How a pull request on a connected repo stands
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/github/pulls/{number} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/github/pulls/{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}/github/pulls/{number}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"number": 12,
"url": "<string>",
"title": "<string>",
"head": "sky-boost",
"base": "main",
"state": "open",
"merged_at": "<string>",
"mergeable": 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>"
}
}{
"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
Example:
"patch"
Example:
"demo-mod"
Example:
12
Response
How it stands
Example:
12
Its page on GitHub
The branch it's from
Example:
"sky-boost"
The branch it goes into
Example:
"main"
Available options:
open, closed, merged When it merged, or null
Whether it can merge as it stands, or null while GitHub works that out