We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a17a7a commit 5675797Copy full SHA for 5675797
crates/rust-project-goals-cli-llm/src/updates.rs
@@ -162,7 +162,9 @@ fn tldr(
162
_issue_id: &IssueId,
163
comments: &mut Vec<ExistingGithubComment>,
164
) -> anyhow::Result<Option<String>> {
165
- let Some(index) = comments.iter().position(|c| c.body.starts_with(TLDR)) else {
+ // `comments` are sorted by creation date in an ascending order, so we look for the most recent
166
+ // TL;DR comment from the end.
167
+ let Some(index) = comments.iter().rposition(|c| c.body.starts_with(TLDR)) else {
168
return Ok(None);
169
};
170
0 commit comments