diff options
Diffstat (limited to 'src/review')
| -rw-r--r-- | src/review/approve.rs | 4 | ||||
| -rw-r--r-- | src/review/candidates.rs | 7 | ||||
| -rw-r--r-- | src/review/diff.rs | 7 | ||||
| -rw-r--r-- | src/review/risk.rs | 5 |
4 files changed, 1 insertions, 22 deletions
diff --git a/src/review/approve.rs b/src/review/approve.rs index adc81c0..82812fb 100644 --- a/src/review/approve.rs +++ b/src/review/approve.rs @@ -220,7 +220,3 @@ pub fn withdraw(db: &Db, actor: &str, release_id: i64, reason: &str) -> Result<( Ok(()) }) } - -pub fn current_accepted(db: &Db, pkgbase: &str) -> Result<Option<ReleaseRow>> { - db::accepted_release(db, pkgbase) -} diff --git a/src/review/candidates.rs b/src/review/candidates.rs index b220013..59db99b 100644 --- a/src/review/candidates.rs +++ b/src/review/candidates.rs @@ -6,13 +6,6 @@ pub use crate::db::candidates::{ reopen_rejected, set_diff_digest, NewCandidate, }; -/// The risk columns are review's to write, from `intake::record` and nowhere -/// else. A fixture that needs a particular score says so through this. -#[cfg(feature = "test-support")] -pub fn set_risk_for_tests(db: &Db, id: i64, level: &str, signals: &[String]) -> Result<()> { - db::candidates::set_risk(db, id, level, signals) -} - #[derive(Debug, Clone, PartialEq, Eq)] pub enum Upsert { Created { id: i64, kind: String }, diff --git a/src/review/diff.rs b/src/review/diff.rs index 42467f0..4a8a3ef 100644 --- a/src/review/diff.rs +++ b/src/review/diff.rs @@ -266,13 +266,6 @@ pub fn diff_digest(ps: &[Panel]) -> String { crate::hash::hex_str(&render_text(ps)) } -pub fn full_recipe_text(db: &Db, c: &CandidateRow) -> Result<String> { - let snap = db::snapshot_by_id(db, c.snapshot_id)?; - let snap = snap.ok_or_else(|| crate::error::Error::not_found("snapshot missing"))?; - let r: Recipe = serde_json::from_str(&snap.srcinfo_json).unwrap_or_default(); - Ok(r.pkgbuild) -} - pub fn render_and_store(db: &Db, cfg: &Config, c: &CandidateRow) -> Result<String> { let base = match c.base_release_id { Some(id) => db::release_by_id(db, id)?, diff --git a/src/review/risk.rs b/src/review/risk.rs index 9c59bfa..9a7145d 100644 --- a/src/review/risk.rs +++ b/src/review/risk.rs @@ -16,15 +16,12 @@ const BUILD_SYSTEM_FILES: &[&str] = &[ ]; #[derive(Debug, Clone, Default)] -pub struct Assessment { +pub(crate) struct Assessment { pub level: String, pub signals: Vec<String>, } impl Assessment { - pub fn is_high(&self) -> bool { - self.level == level::HIGH - } } pub(crate) fn assess( |
