From 3951366142381a5d53f286ab5bf92d5f95fc1b96 Mon Sep 17 00:00:00 2001 From: RobWalt Date: Sun, 22 Oct 2023 11:12:05 +0200 Subject: [PATCH] feat: implement PullRequestMeta --- src/types/api/pull_request_meta.rs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/types/api/pull_request_meta.rs b/src/types/api/pull_request_meta.rs index 2591f35..f247a38 100644 --- a/src/types/api/pull_request_meta.rs +++ b/src/types/api/pull_request_meta.rs @@ -1,7 +1,13 @@ -// PullRequestMeta{ -// description: -// PullRequestMeta PR info if an issue is a PR -// -// merged boolean -// merged_at string($date-time) -// } +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; + +use crate::types::misc::boolean_enums::is::merged::IsMerged; + +/// PullRequestMeta represents PR information for an issue if it is a PR. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct PullRequestMeta { + /// Indicates whether the PR is merged or not. + pub merged: IsMerged, + /// The date and time when the PR was merged (if merged). + pub merged_at: Option>, +}