curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/githubconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/github', 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/github"
response = requests.get(url)
print(response.text){
"repo_id": 123,
"full_name": "sam/sky-mod",
"html_url": "https://github.com/sam/sky-mod",
"default_branch": "main",
"private": true,
"head_commit": "<string>",
"pushed_at": "2023-11-07T05:31:56Z",
"state": "connected"
}{
"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>"
}
}The GitHub repo that's a project's repo
Its GitHub id, name, default branch, head and where it stands (state): connected, disconnected, gone (deleted from GitHub), suspended or no_access (the app no longer reaches it). Its org sees it in any state; anyone else who can find the project sees a connected repo that’s public on GitHub. 404 for a project that’s never been connected.
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/githubconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/github', 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/github"
response = requests.get(url)
print(response.text){
"repo_id": 123,
"full_name": "sam/sky-mod",
"html_url": "https://github.com/sam/sky-mod",
"default_branch": "main",
"private": true,
"head_commit": "<string>",
"pushed_at": "2023-11-07T05:31:56Z",
"state": "connected"
}{
"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>"
}
}Response
Its GitHub repo
GitHub's id for it, which renames keep
"sam/sky-mod"
"https://github.com/sam/sky-mod"
"main"
Whether it's private on GitHub
The default branch's latest commit, as of GitHub's last push event
connected. disconnected: someone disconnected it on Patch, or it moved to an account without Patch's GitHub App. gone: deleted from GitHub. suspended: the app is suspended on its account. no_access: the app no longer reaches it (uninstalled, or the repo was taken out of the installation).
connected, disconnected, gone, suspended, no_access