Skip to main content

ephemeris_forge_forgejo/
live.rs

1use ephemeris_forge::AccessState;
2
3use crate::Permission;
4use crate::api::model::{
5    ActionVariable, BranchProtection, DeployKey, Hook, Label, Repository, TagProtection,
6};
7
8/// The Forgejo state that planning compares with the configuration.
9#[derive(Clone, Debug, Default)]
10pub struct Live {
11    /// The repository as Forgejo reports it. Absent properties stay absent.
12    pub repository: Repository,
13    /// The repository's topics.
14    pub topics: Vec<String>,
15    /// The branch rules in the order Forgejo consults them.
16    pub branch_rules: Vec<BranchProtection>,
17    /// The team and collaborator grants. Empty unless access is managed.
18    pub access: AccessState<Permission>,
19    /// The repository's labels. Empty unless labels are managed.
20    pub labels: Vec<Label>,
21    /// The repository's tag protections. Empty unless tag protection is
22    /// managed.
23    pub tag_protections: Vec<TagProtection>,
24    /// The repository's webhooks. Empty unless webhooks are managed.
25    pub webhooks: Vec<Hook>,
26    /// The repository's deploy keys. Empty unless deploy keys are managed.
27    pub deploy_keys: Vec<DeployKey>,
28    /// The repository's Actions variables. Empty unless they are managed.
29    pub actions_variables: Vec<ActionVariable>,
30}