From f4193a69a03aec5471915646ff2ef743c29fa7e1 Mon Sep 17 00:00:00 2001 From: kokal33 Date: Wed, 25 Oct 2023 17:08:24 +0200 Subject: [PATCH] add missing get_file_sha --- fplus-lib/src/core/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fplus-lib/src/core/mod.rs b/fplus-lib/src/core/mod.rs index c55b2d42..70508cc9 100644 --- a/fplus-lib/src/core/mod.rs +++ b/fplus-lib/src/core/mod.rs @@ -789,6 +789,17 @@ impl LDNPullRequest { } } +pub fn get_file_sha(content: &ContentItems) -> Option { + match content.items.get(0) { + Some(item) => { + let sha = item.sha.clone(); + Some(sha) + } + None => None, + } +} + + #[cfg(test)] mod tests { use super::*;