From 13b63698b5280a0ef2d439b98c61e9ef4f11cb15 Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 30 Aug 2024 11:10:39 +0200 Subject: [PATCH] Uncomment pr_commits function (#680) --- src/api/pulls.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/api/pulls.rs b/src/api/pulls.rs index bdc3add3..43d0c79d 100644 --- a/src/api/pulls.rs +++ b/src/api/pulls.rs @@ -406,7 +406,7 @@ impl<'octo> PullRequestHandler<'octo> { /// #[deprecated( since = "0.34.4", - note = "specific PR builder transitioned to pr_review_actions, reply_to_comment, reply_to_comment" + note = "specific PR builder transitioned to pr_review_actions, pr_commits, reply_to_comment" )] //FIXME: remove? pub fn pull_number(&self, pull_nr: u64) -> SpecificPullRequestBuilder { @@ -426,9 +426,14 @@ impl<'octo> PullRequestHandler<'octo> { } /// /repos/{owner}/{repo}/pulls/{pull_number}/commits - // pub fn pr_commits(&self, pull_nr: u64) -> SpecificPullRequestCommentBuilder<'octo, '_> { - // SpecificPullRequestCommentBuilder::new(self, pull_nr, 0) - // } + pub async fn pr_commits( + &self, + pull_nr: u64, + ) -> crate::Result> { + SpecificPullRequestBuilder::new(self, pull_nr) + .commits() + .await + } // /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies /// Creates a reply to a specific comment of a pull request specified in the first argument