Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Add `CobOptions` to issue creation
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago
3 files changed +10 -1 3139c988 54ce1864
modified crates/radicle-tauri/Cargo.lock
@@ -3890,6 +3890,7 @@ name = "radicle-tauri"
version = "0.0.0"
dependencies = [
 "anyhow",
+
 "base64 0.22.1",
 "log",
 "radicle",
 "radicle-surf",
modified crates/radicle-tauri/src/commands/cob/issue.rs
@@ -1,6 +1,8 @@
use radicle::git;
use radicle::identity::RepoId;
use radicle::issue::cache::Issues;
+
use radicle::node::Handle;
+
use radicle::node::Node;
use radicle::storage::ReadStorage;

use crate::cob::query;
@@ -13,7 +15,9 @@ pub fn create_issue(
    ctx: tauri::State<AppState>,
    rid: RepoId,
    new: cobs::NewIssue,
+
    opts: cobs::CobOptions,
) -> Result<cobs::Issue, Error> {
+
    let mut node = Node::new(ctx.profile.socket());
    let repo = ctx.profile.storage.repository(rid)?;
    let signer = ctx.profile.signer()?;
    let aliases = ctx.profile.aliases();
@@ -27,6 +31,10 @@ pub fn create_issue(
        &signer,
    )?;

+
    if opts.announce() {
+
        node.announce_refs(rid)?;
+
    }
+

    Ok::<_, Error>(cobs::Issue::new(issue.id(), &issue, &aliases))
}

modified src/components/Markdown.svelte
@@ -80,7 +80,7 @@

      // If the image is an oid embed
      if (imagePath && isCommit(imagePath)) {
-
        let base64Content = await invoke<string>("get_file_by_oid", {
+
        const base64Content = await invoke<string>("get_file_by_oid", {
          rid,
          oid: imagePath,
        });