update_comment
Edit a comment on an issue: pass 'body' to replace the whole of it, or 'edits' to change part of it — exact find-and-replace against the comment as get_comments hands it back, each 'oldText' occurring exactly once. One body axis per call. With 'edits' the answer says where each one landed rather than giving the comment back, so correcting one number in a long comment costs neither a resend nor a re-read. Nothing here takes a version and none is needed: an 'oldText' is matched against the comment as it stands now, so an edit whose text somebody has since rewritten is refused rather than applied over their words. The author may edit their own comment; anyone with full write access in the project may edit any. Answers with 'notified' — and note that this is only the people the edit newly reaches: names already present in the old text are not notified again, and the comment is not re-announced to watchers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Issue key the comment is on, e.g. 'UK-1'. | |
| body | No | The new body, replacing the old one entirely. Markdown is kept as written, and carries $…$ / $$…$$ LaTeX formulas and [~username] mentions. | |
| edits | No | Exact replacements in the comment, changing part of it in place. Matched against the body as get_comments returns it — stored as written, so what you read is what an 'oldText' has to equal, whitespace and line breaks included. Every edit is looked for in that text, not in what the edits before it produced; if any one does not fit, none is applied. | |
| commentId | Yes | The comment's id, as returned by get_comments or add_comment. |