---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://sourcecraft.dev/portal/docs/en/cli-ref/src-pr-edit-comment.md
  - https://sourcecraft.dev/portal/docs/ru/cli-ref/src-pr-edit-comment.md
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# src pr edit-comment

Update Comment Updates a pull request comment. Supports updating the comment body, resolution state, and publishing draft comments.

## Usage

`src pr edit-comment <comment-id> [flags]`

### Examples

**Edit a comment by ID**

`src pr edit-comment <comment-id> --body "Updated comment text"`

**Edit without notifications**

`src pr edit-comment <comment-id> --body "Fixed" --silent`

### Flags

| Flag | Description |
| --- | --- |
| `--silent` |  |
| `--body string` |  |
| `--publish` | Set to true to publish a draft comment. Once published, cannot be unpublished. |

### Inherited flags

| Flag | Description |
| --- | --- |
| `--env string` | Override Sourcecraft environment (use 'src envs' to list available) |
| `--json string` | Output JSON, optionally filtered (--json or --json=field1,field2) |
| `--json-compact string` | Output compact JSON, optionally filtered |
| `-R, --repo string` | Select another repository using OWNER/REPO format |
| `-V, --verbose` | Enable debug logging output |

### Learn more

Use `src pr edit-comment <subcommand> --help` for more information about a command.
