Skip to content

Commit cb74a7c

Browse files
committed
separate flagship goals and goals needing help with empty line
markdown will cram them all together
1 parent 3509000 commit cb74a7c

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

crates/rust-project-goals-cli-llm/src/templates.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ pub struct UpdatesGoal {
109109

110110
/// Contents of a "Why this goal?" section in the tracking issue (empty string if not present)
111111
pub why_this_goal: String,
112+
113+
/// If this goal needs to be separated from its following sibling by an empty line.
114+
pub needs_separator: bool,
112115
}
113116

114117
#[derive(Serialize, Debug)]

crates/rust-project-goals-cli-llm/src/updates.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ async fn prepare_goals(
140140
comments,
141141
tldr,
142142
why_this_goal,
143+
needs_separator: true, // updated after sorting
143144
});
144145

145146
progress_bar::inc_progress_bar();
@@ -148,6 +149,11 @@ async fn prepare_goals(
148149
// Updates are in a random order, sort them.
149150
result.sort_by_cached_key(|update| update.title.to_lowercase());
150151

152+
// Mark the last entry as not needing a separator from its following sibling, it has none.
153+
if let Some(last) = result.last_mut() {
154+
last.needs_separator = false;
155+
}
156+
151157
Ok(result)
152158
}
153159

templates/updates.hbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ The Rust project is currently working towards a [slate of {{goal_count}} project
1414
<!-- markdown separator -->
1515

1616
{{>goal_comments}}
17+
18+
{{#if needs_separator}}
19+
<br>
20+
{{/if}}
1721
{{/each}}
1822

1923
## Goals looking for help
@@ -37,6 +41,9 @@ The Rust project is currently working towards a [slate of {{goal_count}} project
3741
<!-- markdown separator -->
3842

3943
{{>goal_comments}}
44+
{{#if needs_separator}}
45+
<br>
46+
{{/if}}
4047
{{/if}}
4148
{{/each}}
4249

0 commit comments

Comments
 (0)