forgejo-hooks: Introduce chrono dep
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
38b366204b
commit
962fc592ee
2 changed files with 11 additions and 9 deletions
|
@ -4,4 +4,5 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
chrono = { version = "0.4", default-features = false, features = ["serde"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use chrono::{DateTime, Utc};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
|
@ -24,7 +25,7 @@ pub struct Commit {
|
||||||
pub url: String,
|
pub url: String,
|
||||||
pub author: CommitAuthor,
|
pub author: CommitAuthor,
|
||||||
pub committer: CommitAuthor,
|
pub committer: CommitAuthor,
|
||||||
pub timestamp: String,
|
pub timestamp: DateTime<Utc>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
|
@ -59,8 +60,8 @@ pub struct Repository {
|
||||||
pub watchers_count: u32,
|
pub watchers_count: u32,
|
||||||
pub open_issues_count: u32,
|
pub open_issues_count: u32,
|
||||||
pub default_branch: String,
|
pub default_branch: String,
|
||||||
pub created_at: String,
|
pub created_at: DateTime<Utc>,
|
||||||
pub updated_at: String,
|
pub updated_at: DateTime<Utc>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
|
@ -91,9 +92,9 @@ pub struct RepositoryFull {
|
||||||
pub open_issues_count: u32,
|
pub open_issues_count: u32,
|
||||||
pub open_pr_counter: u32,
|
pub open_pr_counter: u32,
|
||||||
pub default_branch: String,
|
pub default_branch: String,
|
||||||
pub created_at: String,
|
pub created_at: DateTime<Utc>,
|
||||||
pub updated_at: String,
|
pub updated_at: DateTime<Utc>,
|
||||||
pub archived_at: String,
|
pub archived_at: DateTime<Utc>,
|
||||||
pub permissions: Perms,
|
pub permissions: Perms,
|
||||||
pub has_issues: bool,
|
pub has_issues: bool,
|
||||||
pub internal_tracker: InternalTracker,
|
pub internal_tracker: InternalTracker,
|
||||||
|
@ -114,7 +115,7 @@ pub struct RepositoryFull {
|
||||||
pub avatar_url: String,
|
pub avatar_url: String,
|
||||||
pub internal: bool,
|
pub internal: bool,
|
||||||
pub mirror_internal: String,
|
pub mirror_internal: String,
|
||||||
pub mirror_updated: String,
|
pub mirror_updated: DateTime<Utc>,
|
||||||
pub repo_transfer: Option<String>,
|
pub repo_transfer: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,8 +129,8 @@ pub struct RepositoryOwner {
|
||||||
pub avatar_url: String,
|
pub avatar_url: String,
|
||||||
pub language: String,
|
pub language: String,
|
||||||
pub is_admin: bool,
|
pub is_admin: bool,
|
||||||
pub last_login: String,
|
pub last_login: DateTime<Utc>,
|
||||||
pub created: String,
|
pub created: DateTime<Utc>,
|
||||||
pub restricted: bool,
|
pub restricted: bool,
|
||||||
pub active: bool,
|
pub active: bool,
|
||||||
pub prohibit_login: bool,
|
pub prohibit_login: bool,
|
||||||
|
|
Loading…
Reference in a new issue