PullRequestSettingAddRepository
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/pull_request_settings/add_repositories |
create |
Repositories associated with this project |
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:
created, err := client.PullRequestSettingAddRepository(nil).Create(map[string]any{"organization_id": "example", "project_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 created, err = client:PullRequestSettingAddRepository():create({ organization_id = "example", project_id = "example", repositories = {} })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->PullRequestSettingAddRepository()->create(["organization_id" => "example", "project_id" => "example", "repositories" => []]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.PullRequestSettingAddRepository().create({ "organization_id": "example", "project_id": "example", "repositories": [] })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.PullRequestSettingAddRepository.create({ "organization_id" => "example", "project_id" => "example", "repositories" => [] })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.PullRequestSettingAddRepository().create({ organization_id: "example", project_id: "example", repositories: [] })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
project_id |
string |
Yes | Project Id |
replace |
boolean |
No | Make these the project's only repositories. |
repositories |
array |
Yes | Repositories |
create
POST /api/v1/organizations/{organization_id}/verify/pull_request_settings/add_repositories
Operation ID: add_repositories_api_v1_pull_request_settings.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
project_id |
string |
Yes | |
replace |
boolean |
No | Make these the project's only repositories. Refused when another of its repositories has PR testing set up. |
repositories |
array of string |
Yes |
Responses
200: Repositories associated with this project
application/json
| Property | Type | Required | Description |
|---|---|---|---|
repositories |
array of object |
Yes | |
repositories[].automatic_testing_enabled |
boolean |
Yes | |
repositories[].can_configure |
boolean |
Yes | |
repositories[].configured |
boolean |
Yes | |
repositories[].id |
string |
Yes | |
repositories[].name |
string |
Yes | |
repositories[].preview_source |
string |
Yes | |
repositories[].provider |
enum: github, gitlab |
Yes | |
repositories[].source_importing |
boolean |
Yes | The source is still importing (GitLab): linked, but PR testing can't be configured until it finishes. |
repositories[].source_repository |
string |
Yes |