From ddb0603dcd150ea0217aec1d27a19d35425bd2a3 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 14 May 2024 18:02:53 +0300 Subject: [PATCH] fix: pass on request to run log, harder Signed-off-by: Lars Wirzenius --- src/run.rs | 2 ++ src/runlog.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/run.rs b/src/run.rs index 655f8cb..8d3269d 100644 --- a/src/run.rs +++ b/src/run.rs @@ -128,6 +128,7 @@ impl Run { .repo_name .as_ref() .ok_or(RunError::Missing("repo_name"))?; + let request = self.request.clone().ok_or(RunError::Missing("request"))?; let commit = self.commit.ok_or(RunError::Missing("commit"))?; let storage = self.storage.as_ref().ok_or(RunError::Missing("storage"))?; let timeout = self.timeout.ok_or(RunError::Missing("timeout"))?; @@ -136,6 +137,7 @@ impl Run { self.run_log.title("Log from Radicle native CI"); self.run_log.rid(rid, repo_name); self.run_log.commit(commit); + self.run_log.request(request); // Clone the repository and check out the right commit. If // these fail, the problem is stored in the run log. diff --git a/src/runlog.rs b/src/runlog.rs index 59a8a50..c0d4451 100644 --- a/src/runlog.rs +++ b/src/runlog.rs @@ -41,6 +41,10 @@ impl RunLog { self.title = Some(title.into()); } + pub fn request(&mut self, request: Request) { + self.request = Some(request); + } + pub fn rid(&mut self, rid: RepoId, name: &str) { self.rid = Some(rid); self.repo_name = Some(name.into());