Skip to content

Commit

Permalink
Merge pull request #48 from filecoin-project/add-missing-sha-function
Browse files Browse the repository at this point in the history
add missing get_file_sha
  • Loading branch information
kokal33 authored Oct 25, 2023
2 parents f5e548f + f4193a6 commit ecb6410
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fplus-lib/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,17 @@ impl LDNPullRequest {
}
}

pub fn get_file_sha(content: &ContentItems) -> Option<String> {
match content.items.get(0) {
Some(item) => {
let sha = item.sha.clone();
Some(sha)
}
None => None,
}
}


#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit ecb6410

Please sign in to comment.