Struct octocrab::teams::TeamRepoHandler[][src]

pub struct TeamRepoHandler<'octo> { /* fields omitted */ }
Expand description

Handler for managing a team’s repositories through GitHub’s teams API.

Created with TeamHandler::repos

Implementations

Checks if a team manages a repository, returning the repository if it does.

let manages_repo = octocrab::instance()
    .teams("owner")
    .repos("team")
    .check_manages("owner", "repo")
    .await
    .is_ok();

Updates a team’s permissions for a repository.

use octocrab::params;

octocrab::instance()
    .teams("owner")
    .repos("team")
    .add_or_update("owner", "repo", params::teams::Permission::Maintain)
    .await?;

Removes a repository from a team.

octocrab::instance()
    .teams("owner")
    .repos("team")
    .remove("owner", "repo")
    .await?;

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.