GithubConnection
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/verify/github_connections |
create |
GitHub verification connection |
GET |
/api/v1/organizations/{organization_id}/verify/github_connections |
load |
GitHub verification connection |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
github_connection, err := client.GithubConnection(nil).Load(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(github_connection)
created, err := client.GithubConnection(nil).Create(map[string]any{"organization_id": "example", "github_app_installation_id": "example", "repositories": []any{}}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local github_connection, err = client:GithubConnection():load({ organization_id = "example" })
local created, err = client:GithubConnection():create({ organization_id = "example", github_app_installation_id = "example", repositories = {} })
PHP
Construct client as shown in the PHP setup, then call the operations:
$github_connection = $client->GithubConnection()->load(["organization_id" => "example"]);
$created = $client->GithubConnection()->create(["organization_id" => "example", "github_app_installation_id" => "example", "repositories" => []]);
Python
Construct client as shown in the Python setup, then call the operations:
github_connection = client.GithubConnection().load({"organization_id": "example"})
created = client.GithubConnection().create({ "organization_id": "example", "github_app_installation_id": "example", "repositories": [] })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
github_connection = client.GithubConnection.load({ "organization_id" => "example" })
created = client.GithubConnection.create({ "organization_id" => "example", "github_app_installation_id" => "example", "repositories" => [] })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const github_connection = await client.GithubConnection().load({ organization_id: "example" })
const created = await client.GithubConnection().create({ organization_id: "example", github_app_installation_id: "example", repositories: [] })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
accounts |
array |
Yes | Accounts |
github_app_installation_id |
string |
Yes | Github App Installation Id |
installations |
array |
Yes | Installations |
project_id |
string |
No | Project slug or public ID the repositories are added to. |
replace |
boolean |
No | Make these the project's only repositories. |
repositories |
array |
Yes | Repositories |
create
POST /api/v1/organizations/{organization_id}/verify/github_connections
Operation ID: post_api_v1_organizations_organization_id_verify_github_connections.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
github_app_installation_id |
string |
Yes | |
project_id |
string |
No | Project slug or public ID the repositories are added to. |
replace |
boolean |
No | Make these the project's only repositories. Refused when another of its repositories has PR testing set up. |
repositories |
array of object |
Yes | |
repositories[].name |
string |
Yes | |
repositories[].owner |
string |
Yes |
Responses
200: GitHub verification connection
application/json
| Property | Type | Required | Description |
|---|---|---|---|
repositories |
array of object |
Yes | |
repositories[].repository_id |
string |
Yes | |
repositories[].source_repository |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/organizations/{organization_id}/verify/github_connections
Operation ID: api_v1_github_connections.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
github_app_installation_id |
query |
string |
No | List this account's repositories. |
project_id |
query |
string |
No | Mark only this project's repositories as connected. |
Responses
200: GitHub verification connection
application/json
| Property | Type | Required | Description |
|---|---|---|---|
accounts |
array of object |
Yes | |
accounts[].account_login |
string |
Yes | |
accounts[].github_app_installation_id |
string |
Yes | |
accounts[].repositories |
array of object |
Yes | |
accounts[].repositories[].already_imported |
boolean |
Yes | |
accounts[].repositories[].default_branch |
string |
Yes | |
accounts[].repositories[].empty |
boolean |
Yes | |
accounts[].repositories[].full_name |
string |
Yes | |
accounts[].repositories[].html_url |
string (uri) |
Yes | |
accounts[].repositories[].name |
string |
Yes | |
accounts[].repositories[].owner |
string |
Yes | |
accounts[].repositories[].private |
boolean |
Yes | |
accounts[].repositories[].updated_at |
string |
Yes | |
accounts[].repositories[].visibility |
string |
Yes | |
installations |
array of object |
Yes | |
installations[].account_avatar_url |
string (uri) |
Yes | |
installations[].account_id |
string |
Yes | |
installations[].account_login |
string |
Yes | |
installations[].created_at |
string (date-time) |
Yes | |
installations[].created_at_label |
string |
Yes | |
installations[].id |
string |
Yes | |
installations[].installation_id |
string |
Yes | |
installations[].installed_at |
string (date-time) |
Yes | |
installations[].installed_at_label |
string |
Yes | |
installations[].manage_access_url |
string (uri) |
Yes | |
installations[].organization_id |
string |
Yes | |
installations[].permission_entries |
array of object |
Yes | |
installations[].permission_entries[].access |
string |
Yes | |
installations[].permission_entries[].key |
string |
Yes | |
installations[].permission_entries[].name |
string |
Yes | |
installations[].permissions |
object |
Yes | |
installations[].status |
enum: active, suspended |
Yes | |
installations[].suspended_at |
string (date-time) |
Yes | |
installations[].suspended_at_label |
string |
Yes | |
installations[].updated_at |
string (date-time) |
Yes | |
installations[].updated_at_label |
string |
Yes |