Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
issue: Use terminal module from radicle-cli
Erik Kundt committed 2 years ago
commit 4dd8920163e498d763d489c6bdf0f0884a997ff0
parent 619d72bb1260e578d26a9fc73f3ced6f3cd64bed
1 file changed +6 -6
modified bin/commands/issue.rs
@@ -7,17 +7,17 @@ use std::ffi::OsString;

use anyhow::anyhow;

+
use radicle::identity::RepoId;
use radicle::issue;

-
use radicle::identity::RepoId;
+
use radicle_cli::terminal;
+
use radicle_cli::terminal::{Args, Error, Help};
+

use radicle_tui as tui;

use tui::cob;
use tui::log;

-
use crate::terminal;
-
use crate::terminal::args::{Args, Error, Help};
-

pub const HELP: Help = Help {
    name: "issue",
    description: "Terminal interfaces for issues",
@@ -136,7 +136,7 @@ impl Args for Options {
}

#[tokio::main]
-
pub async fn run(options: Options, _ctx: impl terminal::Context) -> anyhow::Result<()> {
+
pub async fn run(options: Options, ctx: impl terminal::Context) -> anyhow::Result<()> {
    use radicle::storage::ReadStorage;

    let (_, rid) = radicle::rad::cwd()
@@ -144,7 +144,7 @@ pub async fn run(options: Options, _ctx: impl terminal::Context) -> anyhow::Resu

    match options.op {
        Operation::Select { opts } => {
-
            let profile = terminal::profile()?;
+
            let profile = ctx.profile()?;
            let rid = options.repo.unwrap_or(rid);
            let repository = profile.storage.repository(rid).unwrap();