Prepare for reminding
This commit is contained in:
parent
c1c0ced266
commit
aebbcd7815
5 changed files with 124 additions and 5 deletions
|
|
@ -13,6 +13,9 @@ pub struct Context {
|
|||
pub repo_url: url::Url,
|
||||
/// URL of the repository with authentication information attached
|
||||
pub repo_auth_url: url::Url,
|
||||
|
||||
/// Timestamp "now" to be used in comparisons
|
||||
pub timestamp: jiff::Zoned,
|
||||
}
|
||||
|
||||
impl Context {
|
||||
|
|
@ -67,12 +70,15 @@ impl Context {
|
|||
let forgejo = forgejo_api::Forgejo::new(forgejo_api::Auth::Token(token), server_url)
|
||||
.context("Could not create Forgejo API access object")?;
|
||||
|
||||
let timestamp = jiff::Zoned::now();
|
||||
|
||||
Ok(Self {
|
||||
forgejo,
|
||||
owner: owner.to_owned(),
|
||||
repo: repo.to_owned(),
|
||||
repo_url,
|
||||
repo_auth_url,
|
||||
timestamp,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue