fix: pass on request to run log, harder

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-05-14 18:02:53 +03:00
parent 153c4fdcc5
commit ddb0603dcd
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -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.
+4
View File
@@ -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());