# client.projects.repo_connection

> client.projects.repo_connection — the projects.repoConnection operations.

`client.projects.repo_connection` — the `projects.repoConnection` operations.

On `AsyncKindgi` every method is the same, awaited.

## `client.projects.repo_connection.set()`

```python signature
set(
    project_id: str | UUID,
    body: ProjectRepoConnectionBody | Mapping[str, Any] | None = None,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
    **fields: Any,
) -> ProjectRepoConnection
```

Set a project's repo connection. `PUT /v1/projects/{projectId}/repo-connection`

The company-wide GitHub connection the project opens its block changes' pull requests through. For the project's admins (`admin` on it). It replaces any connection set before; setting the one already set answers 200 unchanged. The connection must be the workspace's, made through the GitHub app entry, and owned by the company: 404 `connection-not-found` for one that isn't there or was removed, and 400 `repo-connection-not-company-github` for any other. The project keeps only the id: a connection removed later reads as none. 501 `repo-connection-unsupported` from a runtime that can't keep one, or has no connections.

## `client.projects.repo_connection.clear()`

```python signature
clear(
    project_id: str | UUID,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
) -> ProjectRepoConnection
```

Clear a project's repo connection. `DELETE /v1/projects/{projectId}/repo-connection`

After this, a block change pinned in the project, or added as its latest version, opens no pull request. For the project's admins (`admin` on it). Clearing a project with none answers 200 unchanged. 501 `repo-connection-unsupported` from a runtime that can't keep one.
