azure_devops/pull_requests/methods/create_thread.rs
1use super::super::models::GitPullRequestCommentThread;
2use super::super::PullRequestsClient;
3use crate::constants::ApiPath;
4use crate::error::Result;
5
6impl PullRequestsClient<'_> {
7 pub async fn create_thread(
8 &self,
9 repo: &str,
10 id: i64,
11 thread: &GitPullRequestCommentThread,
12 ) -> Result<GitPullRequestCommentThread> {
13 self.http
14 .post(&ApiPath::pr_threads(repo, id), &[], Some(thread))
15 .await
16 }
17}