Interface GitHubIssue

Represents a GitHub issue.

Note: GitHub's API returns pull requests as issues when listing. Check for the presence of pull_request to distinguish them.

interface GitHubIssue {
    assignees: GitHubUser[];
    body: null | string;
    closed_at: null | string;
    closed_by?: null | GitHubUser;
    comments: number;
    created_at: string;
    html_url: string;
    id: number;
    labels: GitHubLabel[];
    locked: boolean;
    milestone: null | GitHubMilestone;
    number: number;
    pull_request?: { html_url: string; merged_at: null | string; url: string };
    state: "open" | "closed";
    title: string;
    updated_at: string;
    user: GitHubUser;
}

Properties

assignees: GitHubUser[]

Users assigned to this issue

body: null | string

Issue body

closed_at: null | string

ISO 8601 timestamp of closing

closed_by?: null | GitHubUser

User who closed the issue

comments: number

Number of comments

created_at: string

ISO 8601 timestamp of creation

html_url: string

URL to the issue on GitHub

id: number

Unique numeric issue ID (global across GitHub)

labels: GitHubLabel[]

Labels applied to this issue

locked: boolean

Whether the issue is locked

milestone: null | GitHubMilestone

Milestone, if any

number: number

Issue number within the repository

pull_request?: { html_url: string; merged_at: null | string; url: string }

Present when this issue is actually a pull request

state: "open" | "closed"

Current state

title: string

Issue title

updated_at: string

ISO 8601 timestamp of last update

Issue author