Skip to main content

ephemeris_forge_github/api/request/
actions.rs

1use std::num::NonZeroU32;
2
3use facet::Facet;
4
5use crate::actions::ActionScope;
6
7/// The body that sets whether Actions runs and which actions may run.
8#[derive(Facet)]
9pub(crate) struct PermissionsBody {
10    pub(crate) enabled: bool,
11    #[facet(skip_serializing_if = Option::is_none)]
12    pub(crate) allowed_actions: Option<ActionScope>,
13    pub(crate) sha_pinning_required: bool,
14}
15
16/// The body that sets the cache retention limit.
17#[derive(Facet)]
18pub(crate) struct CacheRetentionBody {
19    pub(crate) max_cache_retention_days: NonZeroU32,
20}
21
22/// The body that sets the cache storage limit.
23#[derive(Facet)]
24pub(crate) struct CacheStorageBody {
25    pub(crate) max_cache_size_gb: NonZeroU32,
26}