pub async fn replace_all_labels(
        &self,
        number: u64,
        labels: &[String],
    ) -> Result<Vec<models::Label>> {
        let route = format!(
            "repos/{owner}/{repo}/issues/{issue}/labels",
            owner = self.owner,
            repo = self.repo,
            issue = number
        );

        self.crab
            .put(route, Some(&serde_json::json!({ "labels": labels })))
            .await
    }
/// Replaces all labels for an issue.
/// ```no_run
/// # async fn run() -> octocrab::Result<()> {
/// let labels = octocrab::instance()
///     .issues("owner", "repo")
///     .replace_all_labels(101, &[String::from("help wanted")])
///     .await?;
/// # Ok(())
/// # }
/// ```
Replaces all labels for an issue.
Replaces all labels for an issue .
pub async fn replace_all_labels(
        &self,
        number: u64,
        labels: &[String],
    ) -> Result<Vec<models::Label>> {
        let route = format!(
            "repos/{owner}/{repo}/issues/{issue}/labels",
            owner = self.owner,
            repo = self.repo,
            issue = number
        );
        self.crab
            .put(route, Some(&serde_json::json!({ "labels": labels })))
            .await
    }
pub async fn replace_all_labels ( & self , number : u64 , labels : & [ String ] , ) -> Result < Vec < models :: Label > > { let route = format ! ( " " owner self owner repo self repo issue number ) ; self . crab . put ( route , Some ( & serde_json :: json ! ( { " " labels } ) ) ) . await }
Replaces all labels for an issue.
Replaces all labels for an issue .
&self
number
u64
labels
&[String]
&self
number
u64
labels
&[String]
async fn run() -> octocrab::result<()> {
let labels = octocrab::instance()
.issues("owner", "repo")
.replace_all_labels(101, &[String::from("help wanted")])
.await?.
let labels = octocrab :: instance () . issues ( " owner " " repo " ) . replace_all_labels ( 101 & [ String :: from ( " help wanted " ) ] ) . await? .
ok(())
None
}
None