Skip to main content

ephemeris_forge_github/api/
model.rs

1//! GitHub repository and ruleset data types, and the wire shapes they are
2//! decoded from.
3
4/// The wire shapes of the Actions settings groups.
5pub mod actions;
6mod autolinks;
7mod collaborator;
8mod custom_properties;
9mod environments;
10mod labels;
11mod pages;
12mod repository;
13mod rulesets;
14mod security;
15mod team;
16mod variables;
17mod webhooks;
18
19use facet::Facet;
20
21pub use self::autolinks::Autolink;
22pub use self::collaborator::{Collaborator, Invitation, OwnerKind};
23pub(crate) use self::collaborator::{CollaboratorResponse, InvitationResponse, OwnerResponse};
24pub use self::custom_properties::PropertyEntry;
25pub use self::environments::{BranchPolicy, Environment};
26pub(crate) use self::environments::{BranchPolicyPage, EnvironmentPage, EnvironmentResponse};
27pub use self::labels::Label;
28pub(crate) use self::labels::LabelResponse;
29pub use self::pages::{Pages, Source};
30pub use self::repository::{Repository, ViewerPermissions};
31pub use self::rulesets::Ruleset;
32pub(crate) use self::rulesets::{RulesetResponse, RulesetSummary};
33pub(crate) use self::security::EnabledResponse;
34pub use self::security::{Analysis, CodeScanning, Security};
35pub(crate) use self::team::{CurrentUserResponse, MembershipResponse, TeamResponse};
36pub use self::team::{Membership, Team};
37pub use self::variables::Variable;
38pub(crate) use self::variables::VariablePage;
39pub use self::webhooks::{Webhook, WebhookConfig};
40
41/// Repository immutable-release capability reported by GitHub.
42#[derive(Clone, Copy, Debug, Default, Eq, Facet, PartialEq)]
43pub struct ImmutableReleases {
44    /// Whether immutable releases are enabled for the repository.
45    pub enabled: bool,
46    /// Whether the setting is enforced by the organization and cannot be
47    /// changed at repository scope.
48    pub enforced_by_owner: bool,
49}