diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-08-30 11:10:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 11:10:39 +0200 |
commit | 807cc7592df7c130c51b3a135e47248216cd15a8 (patch) | |
tree | 09b721ae65b6c600ce8bee81cc85808d0c50db88 | |
parent | 0459e31986c27207a0a5be34b5eb6dce7be416e9 (diff) |
Uncomment pr_commits function (#680)
-rw-r--r-- | src/api/pulls.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/api/pulls.rs b/src/api/pulls.rs index bdc3add..43d0c79 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<crate::Page<crate::models::repos::RepoCommit>> { + 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 |