Skip to main content

RepositoryApi

Trait RepositoryApi 

Source
pub trait RepositoryApi {
    // Required methods
    fn immutable_releases(
        &self,
        repository: &RepoRef,
    ) -> impl Future<Output = Result<Option<ImmutableReleases>, ForgeError>> + Send;
    fn patch_repository(
        &self,
        repository: &RepoRef,
        patch: &RepositoryPatch,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn replace_topics(
        &self,
        repository: &RepoRef,
        topics: &[String],
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn repository(
        &self,
        repository: &RepoRef,
    ) -> impl Future<Output = Result<Repository, ForgeError>> + Send;
    fn set_immutable_releases(
        &self,
        repository: &RepoRef,
        enabled: bool,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
}
Expand description

The repository operations of the GitHub API.

Required Methods§

Source

fn immutable_releases( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Option<ImmutableReleases>, ForgeError>> + Send

Read the immutable-release setting. None means GitHub does not offer it for this repository.

Source

fn patch_repository( &self, repository: &RepoRef, patch: &RepositoryPatch, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Write only the changed repository fields.

Source

fn replace_topics( &self, repository: &RepoRef, topics: &[String], ) -> impl Future<Output = Result<(), ForgeError>> + Send

Replace the repository’s topic labels wholesale.

Source

fn repository( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Repository, ForgeError>> + Send

Read the repository’s current settings.

Source

fn set_immutable_releases( &self, repository: &RepoRef, enabled: bool, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Enable or disable immutable releases.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§