Radish alpha
r
rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE
Radicle CI adapter for native CI
Radicle
Git
fix: pass on request to run log, harder
Lars Wirzenius committed 1 year ago
commit ddb0603dcd150ea0217aec1d27a19d35425bd2a3
parent 153c4fd
2 files changed +6 -0
modified 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.
modified 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());