Function: getComments()
ts
function getComments(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
comments?: object[];
maxResults?: number;
self?: string;
startAt?: number;
total?: number;
}>;Defined in: src/cloud/api/issueComments.ts:64
Returns all comments for an issue.
This operation can be accessed anonymously.
Permissions required: Comments are included in the response where the user has:
- Browse projects project permission for the project containing the comment.
- If issue-level security is configured, issue-level security permission to view the issue.
- If the comment has visibility restrictions, belongs to the group or has the role visibility is role visibility is restricted to.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { expand?: | string & object | "renderedBody" | (string & object | "renderedBody")[]; issueIdOrKey: string; maxResults?: number; orderBy?: string & object | "created" | "-created" | "+created"; startAt?: number; } | - |
parameters.expand? | | string & object | "renderedBody" | (string & object | "renderedBody")[] | Use expand to include additional information about comments in the response. This parameter accepts renderedBody, which returns the comment body rendered in HTML. |
parameters.issueIdOrKey? | string | The ID or key of the issue. |
parameters.maxResults? | number | The maximum number of items to return per page. |
parameters.orderBy? | string & object | "created" | "-created" | "+created" | Order the results by a field. Accepts created to sort comments by their created date. |
parameters.startAt? | number | The index of the first item to return in a page of results (page offset). |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; comments?: object[]; maxResults?: number; self?: string; startAt?: number; total?: number; }>