- [HTTP request](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#body.aspect_1)
- [State](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#State)
- [Try it!](https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#try-it)

Modifies a Pull Request in the remote SCM repository associated with a GitRepositoryLink.

### HTTP request

`POST https://developerconnect.googleapis.com/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:modifyPullRequest`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The GitRepositoryLink resource name in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "pullRequestId": string, "title": string, "body": string, "baseRef": string, "state": enum (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#State`) } ``` |

| Fields ||
|---|---|
| `pullRequestId` | `string` Required. The SCM-specific pull request identifier (for example, "45"). |
| `title` | `string` Optional. The title of the Pull Request. |
| `body` | `string` Optional. The body description of the Pull Request. |
| `baseRef` | `string` Optional. The target branch to merge into. |
| `state` | ``enum (`https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks/modifyPullRequest#State`)`` Optional. The state of the Pull Request. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/developer-connect/docs/api/reference/rest/v1/PullRequest`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `developerconnect.gitRepositoryLinks.modifyPullRequest`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## State

State represents the state of the pull request.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Default value. This value is unused. |
| `OPEN` | The pull request is open. |
| `CLOSED` | The pull request is closed. |