curl -X POST "https://app.runtm.com/api/github-app/installations/inst_01J.../add-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx"
}'
import requests
installation_id = "inst_01J..."
resp = requests.post(
f"https://app.runtm.com/api/github-app/installations/{installation_id}/add-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx",
},
)
print(resp.json())
const installationId = "inst_01J...";
const resp = await fetch(
`https://app.runtm.com/api/github-app/installations/${installationId}/add-repo`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
repo_id: 987654,
repo_full_name: "acme-corp/new-repo",
oauth_token: "ghu_xxxx",
}),
}
);
const data = await resp.json();
{
"success": true,
"message": "Repository 'acme-corp/new-repo' added to GitHub App"
}
GitHub App
Add Repo to Installation
Add a repository to a GitHub App installation’s access list.
POST
/
api
/
github-app
/
installations
/
{installation_id}
/
add-repo
curl -X POST "https://app.runtm.com/api/github-app/installations/inst_01J.../add-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx"
}'
import requests
installation_id = "inst_01J..."
resp = requests.post(
f"https://app.runtm.com/api/github-app/installations/{installation_id}/add-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx",
},
)
print(resp.json())
const installationId = "inst_01J...";
const resp = await fetch(
`https://app.runtm.com/api/github-app/installations/${installationId}/add-repo`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
repo_id: 987654,
repo_full_name: "acme-corp/new-repo",
oauth_token: "ghu_xxxx",
}),
}
);
const data = await resp.json();
{
"success": true,
"message": "Repository 'acme-corp/new-repo' added to GitHub App"
}
Adds a repository to a GitHub App installation so subsequent operations can use the installation token instead of a user OAuth token. Requires the user’s OAuth token with
repo scope.
Required scope: integrations:write
string
required
Internal installation ID.
integer
required
GitHub repository ID.
string
required
Full repository name (
owner/repo).string
required
User OAuth token with
repo scope.boolean
required
Whether the operation succeeded.
string
required
Human-readable result message.
curl -X POST "https://app.runtm.com/api/github-app/installations/inst_01J.../add-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx"
}'
import requests
installation_id = "inst_01J..."
resp = requests.post(
f"https://app.runtm.com/api/github-app/installations/{installation_id}/add-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"repo_id": 987654,
"repo_full_name": "acme-corp/new-repo",
"oauth_token": "ghu_xxxx",
},
)
print(resp.json())
const installationId = "inst_01J...";
const resp = await fetch(
`https://app.runtm.com/api/github-app/installations/${installationId}/add-repo`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
repo_id: 987654,
repo_full_name: "acme-corp/new-repo",
oauth_token: "ghu_xxxx",
}),
}
);
const data = await resp.json();
{
"success": true,
"message": "Repository 'acme-corp/new-repo' added to GitHub App"
}