1
0
Fork 0

Merge pull request 'fix Issue pull_request field' (#11) from fix-issue-pr-field into main

Reviewed-on: https://codeberg.org/Cyborus/forgejo-api/pulls/11
This commit is contained in:
Cyborus 2023-11-19 17:24:42 +00:00
commit 16ffd5e330
2 changed files with 3 additions and 3 deletions

View file

@ -133,7 +133,7 @@ pub struct Issue {
pub original_author: String, pub original_author: String,
pub original_author_id: u64, pub original_author_id: u64,
pub pin_order: u64, pub pin_order: u64,
pub pull_request: Option<PullRequestMeta>, pub pull_request: PullRequestMeta,
#[serde(rename = "ref")] #[serde(rename = "ref")]
pub _ref: String, pub _ref: String,
pub repository: RepositoryMeta, pub repository: RepositoryMeta,

View file

@ -332,8 +332,8 @@ pub struct PrBranchInfo {
#[derive(serde::Deserialize, Debug, PartialEq)] #[derive(serde::Deserialize, Debug, PartialEq)]
pub struct PullRequestMeta { pub struct PullRequestMeta {
pub merged: bool, pub merged: bool,
#[serde(with = "time::serde::rfc3339")] #[serde(with = "time::serde::rfc3339::option")]
pub merged_at: time::OffsetDateTime, pub merged_at: Option<time::OffsetDateTime>,
} }
#[derive(Debug)] #[derive(Debug)]