Skip to main content

ephemeris_forge_github/api/operations/
custom_properties.rs

1use ephemeris_forge::RepoRef;
2
3use crate::api::error::ForgeError;
4use crate::api::model::PropertyEntry;
5
6/// The custom properties operations of the GitHub API.
7pub trait CustomPropertiesApi {
8    /// Read the custom property values, or `None` when the repository has no
9    /// custom properties endpoint.
10    fn custom_property_values(
11        &self,
12        repository: &RepoRef,
13    ) -> impl Future<Output = Result<Option<Vec<PropertyEntry>>, ForgeError>> + Send;
14
15    /// Set or clear several custom property values in one request.
16    fn set_custom_property_values(
17        &self,
18        repository: &RepoRef,
19        entries: &[PropertyEntry],
20    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
21}