fix(#2088): drop tracker-tags from comments.rs prose so ci lint passes

This commit is contained in:
damocles 2026-06-29 01:49:12 +02:00 committed by mara
commit 962f417509

View file

@ -18,8 +18,9 @@
//! approve / request-changes / comment review) are merged in too: //! approve / request-changes / comment review) are merged in too:
//! they live in the `pulls/<n>/reviews` object, NOT the //! they live in the `pulls/<n>/reviews` object, NOT the
//! issues/comments thread, so plain comment listings used to miss //! issues/comments thread, so plain comment listings used to miss
//! them entirely and reviewers/authors silently lost feedback //! them entirely and reviewers/authors silently lost feedback —
//! (#2088). They're always included regardless of `--limit`/`--tail` //! the gap this fix closes. They're always included regardless of
//! `--limit`/`--tail`
//! (reviews are few + high-signal) and tagged `[review: STATE]` so //! (reviews are few + high-signal) and tagged `[review: STATE]` so
//! they're distinguishable from issue-thread comments. //! they're distinguishable from issue-thread comments.
//! //!
@ -62,7 +63,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
None => fetch_head(client, repo, args.number, args.limit)?, None => fetch_head(client, repo, args.number, args.limit)?,
}; };
// Merge in PR review bodies (empty for issues — degrades to a // Merge in PR review bodies (empty for issues — degrades to a
// no-op) so review feedback isn't silently dropped (#2088). // no-op) so review feedback isn't silently dropped.
let comments = merge_chronological(thread, fetch_review_bodies(client, repo, args.number)); let comments = merge_chronological(thread, fetch_review_bodies(client, repo, args.number));
// Reading the thread clears its unread notification so the // Reading the thread clears its unread notification so the
// read-before-comment guard (in `comment`) lets a reply through. // read-before-comment guard (in `comment`) lets a reply through.
@ -110,7 +111,8 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
/// ///
/// Review summaries live in the `pulls/<n>/reviews` object, not the /// Review summaries live in the `pulls/<n>/reviews` object, not the
/// issues/comments thread, so the plain comment listing misses them /// issues/comments thread, so the plain comment listing misses them
/// (#2088). Best-effort: returns empty on any error — notably when /// — the review-body gap this fixes. Best-effort: returns empty on
/// any error — notably when
/// `number` is an issue (no reviews endpoint) — so callers degrade /// `number` is an issue (no reviews endpoint) — so callers degrade
/// gracefully. Skips PENDING reviews (not yet visible to others) and /// gracefully. Skips PENDING reviews (not yet visible to others) and
/// empty-body reviews (a bare approval adds nothing to the thread). /// empty-body reviews (a bare approval adds nothing to the thread).
@ -291,7 +293,7 @@ mod tests {
#[test] #[test]
fn merge_interleaves_reviews_by_timestamp() { fn merge_interleaves_reviews_by_timestamp() {
// A review submitted between two comments must land between // A review submitted between two comments must land between
// them, not appended at the end — that's the whole #2088 fix. // them, not appended at the end — that's the whole fix.
let comments = vec![ let comments = vec![
json!({"created_at": "2026-06-29T01:00:00Z", "body": "c1"}), json!({"created_at": "2026-06-29T01:00:00Z", "body": "c1"}),
json!({"created_at": "2026-06-29T01:20:00Z", "body": "c2"}), json!({"created_at": "2026-06-29T01:20:00Z", "body": "c2"}),