[][src]Struct octocrab::actions::ActionsHandler

pub struct ActionsHandler<'octo> { /* fields omitted */ }

Handler for GitHub's actions API.

Created with Octocrab::actions.

Implementations

impl<'octo> ActionsHandler<'octo>[src]

pub async fn add_selected_repo_to_org_secret<'_>(
    &'_ self,
    org: impl AsRef<str>,
    secret_name: impl AsRef<str>,
    repository_id: u64
) -> Result<()>
[src]

Adds a repository to an organization secret when the visibility for repository access is set to selected. The visibility is set when you create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

octocrab::instance()
    .actions()
    .add_selected_repo_to_org_secret("org", "secret_name", 1234)
    .await?;

pub async fn remove_selected_repo_from_org_secret<'_>(
    &'_ self,
    org: impl AsRef<str>,
    secret_name: impl AsRef<str>,
    repository_id: u64
) -> Result<()>
[src]

Removes a repository from an organization secret when the visibility for repository access is set to selected. The visibility is set when you create or update an organization secret. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

octocrab::instance()
    .actions()
    .remove_selected_repo_from_org_secret("org", "secret_name", 1234)
    .await?;

pub async fn cancel_workflow_run<'_>(
    &'_ self,
    owner: impl AsRef<str>,
    repo: impl AsRef<str>,
    run_id: u64
) -> Result<()>
[src]

Cancels a workflow run using its id. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.

octocrab::instance()
    .actions()
    .cancel_workflow_run("owner", "repo", 1234)
    .await?;

pub async fn download_workflow_run_logs<'_>(
    &'_ self,
    owner: impl AsRef<str>,
    repo: impl AsRef<str>,
    run_id: u64
) -> Result<Bytes>
[src]

Downloads and returns the raw data representing a zip of the logs from the workflow run specified by run_id.

octocrab::instance()
    .actions()
    .download_workflow_run_logs("owner", "repo", 1234)
    .await?;

pub async fn download_artifact<'_>(
    &'_ self,
    owner: impl AsRef<str>,
    repo: impl AsRef<str>,
    artifact_id: u64,
    archive_format: ArchiveFormat
) -> Result<Bytes>
[src]

Downloads and returns the raw data representing an artifact from a repository.

use octocrab::params::actions::ArchiveFormat;

octocrab::instance()
    .actions()
    .download_artifact("owner", "repo", 1234, ArchiveFormat::Zip)
    .await?;

pub async fn delete_workflow_run_logs<'_>(
    &'_ self,
    owner: impl AsRef<str>,
    repo: impl AsRef<str>,
    run_id: u64
) -> Result<()>
[src]

Deletes all logs for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.

octocrab::instance()
    .actions()
    .delete_workflow_run_logs("owner", "repo", 1234)
    .await?;

pub async fn get_org_public_key<'_>(
    &'_ self,
    org: impl AsRef<str>
) -> Result<PublicKey>
[src]

Get an organization's public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

let org = octocrab.actions().get_org_public_key("org").await?;

Auto Trait Implementations

impl<'octo> !RefUnwindSafe for ActionsHandler<'octo>

impl<'octo> Send for ActionsHandler<'octo>

impl<'octo> Sync for ActionsHandler<'octo>

impl<'octo> Unpin for ActionsHandler<'octo>

impl<'octo> !UnwindSafe for ActionsHandler<'octo>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.