Post

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Posts a comment on the deployment request, authored as the user that owns the OAuth client.

Send only body for a top-level comment. Add path and a line to post an inline comment on a line of the deployment's diff. Inline comments start a thread that can be replied to and resolved.

Which line fields to send

An inline comment can only be anchored to a line that is part of the diff: a changed line, or one of the unchanged context lines shown around a change. Which field to send depends on the kind of line, the same rules the diff view in the app follows:

LineSend
Added linenewLine only
Removed lineoldLine only
Unchanged (context) lineboth oldLine and newLine

A position that does not follow these rules, or a line outside the diff, returns 400 with the reason in error.

baseSha and headSha pin an inline comment to a specific diff. If omitted they default to the deployment's targetCommit and mergeCommit (see Get a deployment by number). Both are null until the deployment has been built, in which case the request returns 409.

The merge request behind a deployment is created asynchronously, and never for drafts, so posting right after creating a deployment can return 409. Retry shortly.

Path Params
int32
required

The numeric identifier of the Deployment Request.

Body Params
string
required

The comment text, in Markdown. Must not be blank.

string

Inline comments only. Repository path of the file to comment on, e.g. src/classes/Invoice.cls.

int32

Inline comments only. Line number in the new version of the file (an added or unchanged line).

int32

Inline comments only. Line number in the old version of the file (a removed or unchanged line).

string

Inline comments only. Base commit of the diff. Must be given together with headSha. Defaults to the deployment's targetCommit.

string

Inline comments only. Head commit of the diff. Must be given together with baseSha. Defaults to the deployment's mergeCommit.

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Choose an example:
application/json