Listen to git commits for a specific repo and run a shell command

Borrow conf to find the knot

vielle.dev 8fb9f80a 4169ab73

verified
Changed files
+6 -5
src
+1 -3
src/knot.rs
··· 1 - use reqwest::blocking; 2 - 3 - pub fn find_knot(did: String, repo_name: String, pds: String) -> Result<String, ()> { 1 + pub fn find_knot(did: &String, repo_name: &String, pds: &String) -> Result<String, ()> { 4 2 // https://docs.bsky.app/docs/api/com-atproto-repo-list-records 5 3 let mut cursor: Option<String> = None; 6 4
+5 -2
src/main.rs
··· 17 17 Ok(res) => res, 18 18 Err(_) => return Err(()), 19 19 }; 20 - println!(" Found DID `{0}` hosted at `{1}`", did_doc.did, did_doc.pds); 20 + println!( 21 + " Found DID `{0}` hosted at `{1}`", 22 + did_doc.did, did_doc.pds 23 + ); 21 24 22 25 // resolve did+repoName to knotserver 23 26 println!("Resolving @{0}/{1}", config.handle, config.repo_name); 24 - let knot_server = match knot::find_knot(did_doc.did, config.repo_name, did_doc.pds) { 27 + let knot_server = match knot::find_knot(&did_doc.did, &config.repo_name, &did_doc.pds) { 25 28 Ok(val) => val, 26 29 Err(_) => return Err(()), 27 30 };