summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-23 17:35:46 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-23 17:35:46 +0200
commit3a7c8b668d054b21cd670bf0fb5aa751861adef0 (patch)
treedad1f786dff71812a66df1249d8973c249376a19
parent49f6711e2224f0c0e9a80154ed3a7b8b805beb54 (diff)
downloadradicle-native-ci-3a7c8b668d054b21cd670bf0fb5aa751861adef0.tar.gz
fix: cope with heartwood's Id->RepoId rename
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rw-r--r--src/bin/run_log.rs4
-rw-r--r--src/engine.rs4
-rw-r--r--src/run.rs6
-rw-r--r--src/runinfo.rs6
-rw-r--r--src/runlog.rs6
5 files changed, 13 insertions, 13 deletions
diff --git a/src/bin/run_log.rs b/src/bin/run_log.rs
index 0f226ac..a6f3d19 100644
--- a/src/bin/run_log.rs
+++ b/src/bin/run_log.rs
@@ -1,6 +1,6 @@
use std::path::Path;
-use radicle_ci_broker::msg::{Id, Oid};
+use radicle_ci_broker::msg::{Oid, RepoId};
use radicle_native_ci::runlog::RunLog;
@@ -8,7 +8,7 @@ use radicle_native_ci::runlog::RunLog;
fn main() {
let mut run_log = RunLog::new(Path::new("testlog.html"));
run_log.title("Some Title");
- run_log.rid(Id::from_urn("rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE").expect("rid"));
+ run_log.rid(RepoId::from_urn("rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE").expect("rid"));
run_log.commit(Oid::try_from("b788f7ffd38572614457adb1656c0b4575b941dd").expect("commit"));
run_log.runcmd(
&["git", "pull"],
diff --git a/src/engine.rs b/src/engine.rs
index d4b0c01..602b9ee 100644
--- a/src/engine.rs
+++ b/src/engine.rs
@@ -3,7 +3,7 @@ use std::path::PathBuf;
use uuid::Uuid;
use radicle::prelude::Profile;
-use radicle_ci_broker::msg::{Id, Oid, Request, RunId, RunResult};
+use radicle_ci_broker::msg::{Oid, RepoId, Request, RunId, RunResult};
use crate::{
config::{Config, ConfigError},
@@ -140,7 +140,7 @@ impl Engine {
// Execute the CI run. Log any problems to a log for this run, and
// persist that. Update the run info builder as needed.
- fn run_helper(&mut self, rid: Id, commit: Oid) -> Result<bool, EngineError> {
+ fn run_helper(&mut self, rid: RepoId, commit: Oid) -> Result<bool, EngineError> {
// Pick a run id and create a directory for files related to
// the run.
let (run_id, run_dir) = mkdir_run(&self.config)?;
diff --git a/src/run.rs b/src/run.rs
index 3cd929b..423d143 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -3,7 +3,7 @@ use std::{
process::Command,
};
-use radicle_ci_broker::msg::{Id, Oid};
+use radicle_ci_broker::msg::{Oid, RepoId};
use crate::{
msg::NativeMessageError,
@@ -29,7 +29,7 @@ const RUNSPEC_PATH: &str = ".radicle/native.yaml";
#[derive(Debug)]
pub struct Run {
run_log: RunLog,
- rid: Option<Id>,
+ rid: Option<RepoId>,
commit: Option<Oid>,
storage: Option<PathBuf>,
timeout: Option<usize>,
@@ -52,7 +52,7 @@ impl Run {
}
/// Set the git repository to use for this run.
- pub fn set_repository(&mut self, rid: Id) {
+ pub fn set_repository(&mut self, rid: RepoId) {
self.rid = Some(rid);
}
diff --git a/src/runinfo.rs b/src/runinfo.rs
index 6d39898..f23f2b8 100644
--- a/src/runinfo.rs
+++ b/src/runinfo.rs
@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
use serde::{Deserialize, Serialize};
use time::{macros::format_description, OffsetDateTime};
-use radicle_ci_broker::msg::{Id, Oid, RunId, RunResult};
+use radicle_ci_broker::msg::{Oid, RepoId, RunId, RunResult};
/// Metadata about a run.
#[derive(Debug, Serialize, Deserialize)]
@@ -52,7 +52,7 @@ impl RunInfo {
#[derive(Debug, Default)]
#[allow(dead_code)]
pub struct RunInfoBuilder {
- repo: Option<Id>,
+ repo: Option<RepoId>,
commit: Option<Oid>,
run_id: Option<String>,
result: Option<RunResult>,
@@ -61,7 +61,7 @@ pub struct RunInfoBuilder {
}
impl RunInfoBuilder {
- pub fn repo(&mut self, repo: Id) {
+ pub fn repo(&mut self, repo: RepoId) {
self.repo = Some(repo);
}
diff --git a/src/runlog.rs b/src/runlog.rs
index 65ba9af..d23a098 100644
--- a/src/runlog.rs
+++ b/src/runlog.rs
@@ -2,7 +2,7 @@ use std::path::{Path, PathBuf};
use html_page::{Document, Element, Tag};
-use radicle_ci_broker::msg::{Id, Oid};
+use radicle_ci_broker::msg::{Oid, RepoId};
use crate::runspec::RunSpecError;
@@ -10,7 +10,7 @@ use crate::runspec::RunSpecError;
pub struct RunLog {
filename: PathBuf,
title: Option<String>,
- rid: Option<Id>,
+ rid: Option<RepoId>,
commit: Option<Oid>,
commands: Vec<Command>,
timeout: bool,
@@ -29,7 +29,7 @@ impl RunLog {
self.title = Some(title.into());
}
- pub fn rid(&mut self, rid: Id) {
+ pub fn rid(&mut self, rid: RepoId) {
self.rid = Some(rid);
}