[−][src]Struct octocrab::teams::TeamRepoHandler
Handler for managing a team's repositories through GitHub's teams API.
Created with TeamHandler::repos
Implementations
impl<'octo> TeamRepoHandler<'octo>
[src]
pub async fn check_manages<'_>(
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>
) -> Result<Repository>
[src]
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>
) -> Result<Repository>
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();
pub async fn add_or_update<'_>(
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>,
permission: impl Into<Option<Permission>>
) -> Result<()>
[src]
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>,
permission: impl Into<Option<Permission>>
) -> Result<()>
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?;
pub async fn remove<'_>(
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>
) -> Result<()>
[src]
&'_ self,
repo_owner: impl Into<String>,
repo_name: impl Into<String>
) -> Result<()>
Removes a repository from a team.
octocrab::instance() .teams("owner") .repos("team") .remove("owner", "repo") .await?;
Auto Trait Implementations
impl<'octo> !RefUnwindSafe for TeamRepoHandler<'octo>
impl<'octo> Send for TeamRepoHandler<'octo>
impl<'octo> Sync for TeamRepoHandler<'octo>
impl<'octo> Unpin for TeamRepoHandler<'octo>
impl<'octo> !UnwindSafe for TeamRepoHandler<'octo>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,