#[non_exhaustive]pub struct Issue {
pub number: u64,
pub title: String,
pub state: String,
pub body: String,
pub url: String,
pub labels: Vec<String>,
pub assignees: Vec<String>,
pub author: String,
pub created_at: String,
pub updated_at: String,
pub milestone: Option<String>,
}Expand description
An issue (gh issue list --json number,title,state;
gh issue view additionally fills body/url).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.number: u64Issue number.
title: StringIssue title.
state: StringState, e.g. "OPEN", "CLOSED".
body: StringIssue body (markdown). Fetched by both issue_list and issue_view.
url: StringWeb URL. Fetched by both issue_list and issue_view.
labels: Vec<String>Labels attached to the issue (gh --json labels, flattened from
[{"name": "bug", ...}] to plain names).
assignees: Vec<String>Logins of assigned users (gh --json assignees, flattened from
[{"login": "octocat", ...}] to plain logins).
Author’s login (gh --json author, flattened from {"login": …}; a
deleted account’s null author becomes an empty string, matching the
existing PR feedback author flatten).
created_at: StringCreation timestamp (RFC 3339) (gh --json createdAt).
updated_at: StringLast-update timestamp (RFC 3339) (gh --json updatedAt).
milestone: Option<String>Milestone title, or None when no milestone is attached (gh --json milestone, flattened from {"title": …}; a null milestone becomes
None).