Add Runtime::new_committer_sig()
This commit is contained in:
parent
e0a390d840
commit
9d9338d0e4
1 changed files with 9 additions and 0 deletions
|
@ -92,6 +92,15 @@ impl<'a> Runtime<'a> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new_committer_sig(&self) -> Option<Result<Signature>> {
|
||||||
|
self.committer
|
||||||
|
.as_ref()
|
||||||
|
.map(|c| {
|
||||||
|
Signature::now(c.name, c.mail)
|
||||||
|
.map_err(|e| GHEK::MkSignature.into_error_with_cause(Box::new(e)))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
pub fn repository(&self) -> Result<&Repository> {
|
pub fn repository(&self) -> Result<&Repository> {
|
||||||
self.repository.as_ref().ok_or(GHEK::MkRepo.into_error())
|
self.repository.as_ref().ok_or(GHEK::MkRepo.into_error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue