list-issue-comments
Retrieve comments from a specific GitHub Enterprise issue using repository details, issue number, and pagination options to streamline issue management and collaboration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_number | Yes | Issue number | |
| owner | Yes | Repository owner (user or organization) | |
| page | No | Page number | |
| per_page | No | Items per page | |
| repo | Yes | Repository name |
Implementation Reference
- api/issues/issues.ts:95-111 (handler)The core handler function that implements the logic to list comments for a specific issue in a GitHub repository. It uses the GitHubClient to make a GET request to the issues/{issue_number}/comments endpoint.export async function listIssueComments( client: GitHubClient, params: ListIssueCommentsParams ): Promise<IssueComment[]> { const { owner, repo, issue_number, ...rest } = params; const queryParams = new URLSearchParams(); // Add additional parameters Object.entries(rest).forEach(([key, value]) => { if (value !== undefined) { queryParams.append(key, String(value)); } }); const queryString = queryParams.toString() ? `?${queryParams.toString()}` : ''; return client.get<IssueComment[]>(`/repos/${owner}/${repo}/issues/${issue_number}/comments${queryString}`); }
- api/issues/types.ts:49-55 (schema)Input parameter type definition (schema) for the listIssueComments handler, including required fields owner, repo, issue_number and optional pagination parameters.export interface ListIssueCommentsParams { owner: string; repo: string; issue_number: number; page?: number; per_page?: number; }
- api/issues/types.ts:96-107 (schema)Output type definition (schema) for individual issue comments returned by the listIssueComments handler.export interface IssueComment { id: number; body: string; user: { login: string; id: number; avatar_url: string; }; created_at: string; updated_at: string; html_url: string; }