From 49b38bed92f477c7748dc6726bd24f6cbbee645b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 16 Aug 2024 17:48:33 +0200 Subject: [PATCH] Uncomment pr_commits function --- 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