# Method: projects.repos.patch

- [HTTP request](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos/patch#try-it)

Updates information about a repo.

### HTTP request

`PATCH https://sourcerepo.googleapis.com/v1/{name=projects/*/repos/**}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The name of the requested repository. Values are of the form `projects/<project>/repos/<repo>`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `source.repos.updateRepoConfig` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "repo": { object (`https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos#Repo`) }, "updateMask": string } ``` |

| Fields ||
|---|---|
| `repo` | ``object (`https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos#Repo`)`` The new configuration for the repository. |
| `updateMask` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask` format)`` A FieldMask specifying which fields of the repo to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos#Repo`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).