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