pub async fn add_assignees(
        &self,
        number: u64,
        assignees: &[&str],
    ) -> Result<models::issues::Issue> {
        let route = format!(
            "repos/{owner}/{repo}/issues/{issue}/assignees",
            owner = self.owner,
            repo = self.repo,
            issue = number
        );

        self.crab
            .post(route, Some(&serde_json::json!({ "assignees": assignees })))
            .await
    }
/// Adds up to 10 assignees to an issue. Users already assigned to an issue
/// are not replaced.
/// ```no_run
/// # async fn run() -> octocrab::Result<()> {
/// # let octocrab = octocrab::Octocrab::default();
/// let issue = octocrab.issues("owner", "repo").add_assignees(101, &["username1", "username2"]).await?;
/// # Ok(())
/// # }
/// ```
Adds up to 10 assignees to an issue. Users already assigned to an issue
are not replaced.
Adds up to 10 assignees to an issue . Users already assigned to an issue are not replaced .
pub async fn add_assignees(
        &self,
        number: u64,
        assignees: &[&str],
    ) -> Result<models::issues::Issue> {
        let route = format!(
            "repos/{owner}/{repo}/issues/{issue}/assignees",
            owner = self.owner,
            repo = self.repo,
            issue = number
        );
        self.crab
            .post(route, Some(&serde_json::json!({ "assignees": assignees })))
            .await
    }
pub async fn add_assignees ( & self , number : u64 , assignees : & [ & str ] , ) -> Result < models :: issues :: Issue > { let route = format ! ( " " owner self owner repo self repo issue number ) ; self . crab . post ( route , Some ( & serde_json :: json ! ( { " " assignees } ) ) ) . await }
Adds up to 10 assignees to an issue.
Adds up to 10 assignees to an issue .
&self
number
u64
assignees
&[&str]
&self
number
u64
assignees
&[&str]
async fn run() -> octocrab::result<()> {
None
let octocrab = octocrab::octocrab::default();
let issue = octocrab.issues("owner", "repo").add_assignees(101, &["username1", "username2"]).await?.
let issue = octocrab . issues ( " owner " " repo " ) . add_assignees ( 101 & [ " username1 " " username2 " ] ) . await? .
ok(())
None
}
None