Import GitHub repo
curl --request POST \
--url https://api.runaether.dev/projects/{projectID}/github/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repo_url": "<string>",
"installation_id": 2,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.runaether.dev/projects/{projectID}/github/import"
payload = {
"repo_url": "<string>",
"installation_id": 2,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
repo_url: '<string>',
installation_id: 2,
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.runaether.dev/projects/{projectID}/github/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/projects/{projectID}/github/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'repo_url' => '<string>',
'installation_id' => 2,
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/projects/{projectID}/github/import"
payload := strings.NewReader("{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runaether.dev/projects/{projectID}/github/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/projects/{projectID}/github/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"clone_url": "<string>",
"default_branch": "<string>",
"repo_full_name": "<string>",
"repo_name": "<string>",
"repo_owner": "<string>",
"state": "linked"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}GitHub
Import GitHub repo
Links a GitHub repository to the project, and clones it into one of the project's workspaces when workspace_id is given.
Use this tool when you need to:
- Give a new project its repository
- Repair a project's GitHub access after GitHub was disconnected and connected again, by importing the same repository
- Clone the linked repository into a workspace of the project
Examples:
- POST /projects/{projectID}/github/import {"repo_url": "acme/widgets", "installation_id": 12345678}
- POST /projects/{projectID}/github/import {"repo_url": "https://github.com/acme/widgets", "workspace_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21"}
Hints:
- repo_url is owner/repo or a GitHub URL. installation_id is the GitHub App installation that reaches it (from listGithubRepos or getGithubRepo); without it only a public repository is read.
- A project keeps one repository for life: a different repository is refused with 409 and needs a new project; one already linked to another unarchived project of the organization is refused with 409 (use that project, or archive it first).
- The repository must have a commit and be at most 2 GB, and its default branch no surrounding whitespace, which would name another branch trimmed (400 otherwise, naming the branch). The link is kept when a clone fails, so the clone can be retried.
- Use saveTaskRepository instead to push the work of a task that has no repository to GitHub, into a new or picked repository or the project's own.
- Owners and admins of the project's organization, with push access to the repository on GitHub when installation_id is given: connecting a repository lets every member of the organization, viewers included, read its code. A member, viewer or billing member is refused with 403 org_role_insufficient, a project the caller cannot see is 404, and an agent host's grant acts as its owner. Refused with 404 for a repository the caller cannot reach or push to or a workspace not found, 400 for a workspace of another project, 401 when the caller has no GitHub App installation, 409 github_reconnect_required, 502 when GitHub fails to answer and 503 when the workspace cannot be started or the integration is disabled.
POST
/
projects
/
{projectID}
/
github
/
import
Import GitHub repo
curl --request POST \
--url https://api.runaether.dev/projects/{projectID}/github/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repo_url": "<string>",
"installation_id": 2,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.runaether.dev/projects/{projectID}/github/import"
payload = {
"repo_url": "<string>",
"installation_id": 2,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
repo_url: '<string>',
installation_id: 2,
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.runaether.dev/projects/{projectID}/github/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/projects/{projectID}/github/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'repo_url' => '<string>',
'installation_id' => 2,
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/projects/{projectID}/github/import"
payload := strings.NewReader("{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runaether.dev/projects/{projectID}/github/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/projects/{projectID}/github/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"repo_url\": \"<string>\",\n \"installation_id\": 2,\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"clone_url": "<string>",
"default_branch": "<string>",
"repo_full_name": "<string>",
"repo_name": "<string>",
"repo_owner": "<string>",
"state": "linked"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
OK
- Option 1
- Option 2