From 55a1c57212ce56f5f8fbf0734c522cea87f4e460 Mon Sep 17 00:00:00 2001 From: b1ek Date: Sat, 5 Aug 2023 02:19:34 +1000 Subject: [PATCH] add Pull and Branch types --- src/gitea.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/gitea.rs b/src/gitea.rs index 878521c..4e13dba 100644 --- a/src/gitea.rs +++ b/src/gitea.rs @@ -17,4 +17,27 @@ pub struct Repo { pub archived: bool, pub has_pull_requests: bool, pub has_issues: bool +} + +#[derive(Serialize, Deserialize, Clone)] +pub struct Branch { + pub label: String, + pub sha: String, + pub repo_id: i64, + pub repo: Repo +} + +#[derive(Serialize, Deserialize, Clone)] +pub struct Pull { + pub id: i64, + pub url: String, + pub number: i64, + pub title: String, + pub body: String, + pub state: String, + pub mergeable: String, + pub repo: Repo, + pub base: Branch, + pub head: Branch, + pub merge_base: String } \ No newline at end of file