Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/github/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub struct TokenFactory {
}

impl TokenFactory {
#[tracing::instrument]
pub fn new(github_host: GitHubHost, app_id: AppId, private_key: PrivateKey) -> Self {
let expiration = Utc::now().sub(Duration::days(1));

Expand All @@ -67,6 +68,7 @@ impl TokenFactory {
}
}

#[tracing::instrument]
pub fn app(&self) -> Result<Token<App>, Error> {
let now = Utc::now();

Expand All @@ -92,6 +94,7 @@ impl TokenFactory {
Ok(token)
}

#[tracing::instrument]
pub async fn installation(
&self,
installation_id: InstallationId,
Expand Down Expand Up @@ -136,6 +139,7 @@ impl TokenFactory {
Ok(token)
}

#[tracing::instrument]
fn generate_jwt(&self) -> Result<String, Error> {
let now = Utc::now();

Expand Down