pub struct Issue {
pub number: i64,
pub title: String,
pub body: Option<String>,
pub state: String,
pub state_reason: Option<String>,
pub url: String,
pub labels: Vec<Label>,
pub author: Option<Author>,
pub comments: Vec<IssueComment>,
}Fields§
§number: i64§title: String§body: Option<String>§state: String§state_reason: Option<String>Why it was closed: completed or not_planned, empty when open or
when the field was not asked for.
The tracker’s tick means the work landed, and a closed issue on its own
does not say that. With close_skipped = true, the default, an item
both agents declined is closed as not planned, and ticking it writes
“this was done” into somebody’s checklist.
url: String§labels: Vec<Label>Who filed it. None when the field was not asked for.
comments: Vec<IssueComment>What was said on it since it was filed. Empty when the field was not asked for, which a listing of the whole queue never does.
Implementations§
Source§impl Issue
impl Issue
pub fn body_text(&self) -> &str
Sourcepub fn body_for_prompt(&self, max: usize) -> (String, bool)
pub fn body_for_prompt(&self, max: usize) -> (String, bool)
The body as a prompt carries it, and whether anything was left off.
Shortened only past max, which is sized so that nothing a person
wrote ever reaches it. When it does fire the cut is announced in the
text itself: an agent handed a fragment with no marker has no way to
tell it from an issue that simply ended there, so it judges the part it
saw and reports the confidence of having seen all of it.
The cut lands on a line boundary, and an unbalanced code fence is closed rather than left hanging. Broken markdown reads as a defect in the issue and costs the model attention to rule out.
pub fn is_closed(&self) -> bool
Sourcepub fn closed_as_completed(&self) -> bool
pub fn closed_as_completed(&self) -> bool
Closed because the work was done, rather than because somebody decided not to do it.
An unknown reason counts as completed: GitHub leaves stateReason
empty on issues closed before it existed, and reading those as declined
would leave every old checklist unticked.