Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/logs/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<O: Outside> Record<O> {
self.activity_write(
root,
&format!("{} warning: {warning}", Kind::UserConfig),
Some(History::Kind(Kind::UserConfig)),
Some(Kind::UserConfig),
);
}
}
Expand Down Expand Up @@ -393,7 +393,7 @@ impl<O: Outside> Record<O> {
self.activity_write(
&self.root(repo),
&format!("{kind} skipped: {reason}"),
Some(History::Kind(kind)),
Some(kind),
);
}

Expand All @@ -416,7 +416,7 @@ impl<O: Outside> Record<O> {
} else {
History::Kind(Kind::Process)
};
self.activity_write(
self.activity_write_with_history(
&root,
&format!("Process {name} skipped: {reason}"),
Some(history),
Expand Down Expand Up @@ -822,7 +822,16 @@ impl<O: Outside> Record<O> {
}
}

fn activity_write(&mut self, root: &Path, line: &str, unless_last_of: Option<History<'_>>) {
fn activity_write(&mut self, root: &Path, line: &str, unless_last_of: Option<Kind>) {
self.activity_write_with_history(root, line, unless_last_of.map(History::Kind));
}

fn activity_write_with_history(
&mut self,
root: &Path,
line: &str,
unless_last_of: Option<History<'_>>,
) {
let appended = self.activity_append(&root.join(activity::FILE), line, unless_last_of);
if let Err(error) = appended
&& !self.activity_warned
Expand Down
11 changes: 5 additions & 6 deletions tests/console/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,12 @@ fn console_and_status_share_both_quota_reserves_and_resume_at_reset() {
);
gh["rate_limits"][resource]["remaining"] = json!(5000);
scenario.write_gh_state(&gh);
pr_is(&scenario, "MERGED");
let mut stream = events(&console);
loop {
assert!(sse_event(&mut stream).contains("event: commands"));
if !console.get("/").text().unwrap().contains(description) {
break;
}
}
// The warning expires with the clock; the row moves only after the
// background read resumes and observes the merged pull request.
wait_for(&console, &mut stream, "resolved");
assert!(!console.get("/").text().unwrap().contains(description));
assert!(scenario.gh_calls_of("api", "graphql").len() >= 2);
drop(stream);
drop(console);
Expand Down