Skip to content

Commit 4f1d12a

Browse files
committed
include state, document approach
1 parent 2159fea commit 4f1d12a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

mdbook-goals/src/json.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
//! Generate JSON summarizing the tracking issues.
2+
//!
3+
//! This module contains types (e.g., [`TrackingIssues`]) that represent the
4+
//! external API that is used by the website
5+
//! and other tools to consume the tracking issue data. They are very similar
6+
//! to the types in `gh` and so forth but because they represent
7+
//! a versioned API, we copy them over here to insulate them from incidental changes.
28
39
use std::path::PathBuf;
410

511
use serde::Serialize;
612

713
use crate::{
8-
gh::issues::{list_issue_titles_in_milestone, ExistingGithubComment, ExistingGithubIssue},
14+
gh::issues::{
15+
list_issue_titles_in_milestone, ExistingGithubComment, ExistingGithubIssue,
16+
ExistingIssueState,
17+
},
918
re,
1019
};
1120

@@ -29,6 +38,7 @@ pub(super) fn generate_json(
2938
checked_checkboxes,
3039
assignees: issue.assignees.into_iter().collect(),
3140
updates: updates(issue.comments),
41+
state: issue.state,
3242
}
3343
})
3444
.collect(),
@@ -78,6 +88,9 @@ struct TrackingIssue {
7888

7989
/// Posts that we consider to be status updates, in chronological order
8090
updates: Vec<TrackingIssueUpdate>,
91+
92+
/// Issue state
93+
state: ExistingIssueState,
8194
}
8295

8396
#[derive(Serialize)]

0 commit comments

Comments
 (0)