Skip to main content

azure_devops/pull_requests/methods/
add_reviewer.rs

1use super::super::models::IdentityRefWithVote;
2use super::super::PullRequestsClient;
3use crate::constants::ApiPath;
4use crate::error::Result;
5use serde_json;
6
7impl PullRequestsClient<'_> {
8    pub async fn add_reviewer(
9        &self,
10        repo: &str,
11        id: i64,
12        reviewer_id: &str,
13    ) -> Result<IdentityRefWithVote> {
14        let empty = serde_json::Value::Null;
15        self.http
16            .put(&ApiPath::pr_reviewer(repo, id, reviewer_id), &[], &empty)
17            .await
18    }
19}