forgejo_sdk/api/
repo.rs

1use super::*;
2use super::user::User;
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct Repository {
6    pub id: u64,
7    pub owner: User,
8    pub name: String,
9    pub full_name: String,
10    pub description: String,
11    pub empty: bool,
12    pub private: bool,
13    pub fork: bool,
14    pub template: bool,
15    pub mirror: bool,
16    pub size: i64,
17    pub language: String,
18    pub languages_url: String,
19    pub html_url: String,
20    pub url: String,
21    pub link: String,
22    pub ssh_url: String,
23    pub clone_url: String,
24    pub original_url: String,
25    pub website: String,
26    pub stars_count: i64,
27    pub forks_count: i64,
28    pub watchers_count: i64,
29    pub open_issues_count: i64,
30    pub open_pr_counter: i64,
31    pub release_counter: i64,
32    pub default_branch: String,
33    pub archived: bool,
34    pub created_at: String,
35    pub updated_at: String,
36    pub archived_at: String,
37    pub permissions: Permissions,
38    pub has_issues: bool,
39    pub internal_tracker: InternalTracker,
40    pub has_wiki: bool,
41    pub has_pull_requests: bool,
42    pub has_projects: bool,
43    pub has_releases: bool,
44    pub has_packages: bool,
45    pub has_actions: bool,
46    pub ignore_whitespace_conflicts: bool,
47    pub allow_merge_commits: bool,
48    pub allow_rebase: bool,
49    pub allow_rebase_explicit: bool,
50    pub allow_squash_merge: bool,
51    pub allow_rebase_update: bool,
52    pub default_delete_branch_after_merge: bool,
53    pub default_merge_style: String,
54    pub default_allow_maintainer_edit: bool,
55    pub avatar_url: String,
56    pub internal: bool,
57    pub mirror_interval: String,
58    pub mirror_updated: String,
59}
60
61#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
62pub struct Permissions {
63    pub admin: bool,
64    pub push: bool,
65    pub pull: bool,
66}
67
68#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
69pub struct InternalTracker {
70    pub enable_time_tracker: bool,
71    pub allow_only_contributors_to_track_time: bool,
72    pub enable_issue_dependencies: bool,
73}