Struct octorust::pulls::Pulls [−][src]
pub struct Pulls {
pub client: Client,
}
Fields
client: Client
Implementations
pub async fn list(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
head: &str,
base: &str,
sort: PullsListSort,
direction: Order,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestSimple>>
pub async fn list(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
head: &str,
base: &str,
sort: PullsListSort,
direction: Order,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestSimple>>
List pull requests.
This function performs a GET
to the /repos/{owner}/{repo}/pulls
endpoint.
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.
FROM: https://docs.github.com/rest/reference/pulls#list-pull-requests
Parameters:
owner: &str
repo: &str
state: crate::types::IssuesListState
– Indicates the state of the issues to return. Can be eitheropen
,closed
, orall
.head: &str
– Filter pulls by head user or head organization and branch name in the format ofuser:ref-name
ororganization:ref-name
. For example:github:new-script-format
oroctocat:test-branch
.base: &str
– Filter pulls by base branch name. Example:gh-pages
.sort: crate::types::PullsListSort
– What to sort results by. Can be eithercreated
,updated
,popularity
(comment count) orlong-running
(age, filtering by pulls updated in the last month).direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
head: &str,
base: &str,
sort: PullsListSort,
direction: Order
) -> Result<Vec<PullRequestSimple>>
pub async fn list_all(
&self,
owner: &str,
repo: &str,
state: IssuesListState,
head: &str,
base: &str,
sort: PullsListSort,
direction: Order
) -> Result<Vec<PullRequestSimple>>
List pull requests.
This function performs a GET
to the /repos/{owner}/{repo}/pulls
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.
FROM: https://docs.github.com/rest/reference/pulls#list-pull-requests
pub async fn create(
&self,
owner: &str,
repo: &str,
body: &PullsCreateRequest
) -> Result<PullRequestData>
pub async fn create(
&self,
owner: &str,
repo: &str,
body: &PullsCreateRequest
) -> Result<PullRequestData>
Create a pull request.
This function performs a POST
to the /repos/{owner}/{repo}/pulls
endpoint.
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.
To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
You can create a new pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/pulls#create-a-pull-request
Parameters:
owner: &str
repo: &str
pub async fn list_review_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: PullsListReviewCommentsRepoSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestReviewComment>>
pub async fn list_review_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: PullsListReviewCommentsRepoSort,
direction: Order,
since: Option<DateTime<Utc>>,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestReviewComment>>
List review comments in a repository.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/comments
endpoint.
Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
FROM: https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository
Parameters:
owner: &str
repo: &str
sort: crate::types::PullsListReviewCommentsRepoSort
direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all_review_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: PullsListReviewCommentsRepoSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<PullRequestReviewComment>>
pub async fn list_all_review_comments_for_repo(
&self,
owner: &str,
repo: &str,
sort: PullsListReviewCommentsRepoSort,
direction: Order,
since: Option<DateTime<Utc>>
) -> Result<Vec<PullRequestReviewComment>>
List review comments in a repository.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/comments
endpoint.
As opposed to list_review_comments_for_repo
, this function returns all the pages of the request at once.
Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
FROM: https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository
pub async fn get_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<PullRequestReviewComment>
pub async fn get_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64
) -> Result<PullRequestReviewComment>
Get a review comment for a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/comments/{comment_id}
endpoint.
Provides details for a review comment.
FROM: https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
Delete a review comment for a pull request.
This function performs a DELETE
to the /repos/{owner}/{repo}/pulls/comments/{comment_id}
endpoint.
Deletes a review comment.
FROM: https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
pub async fn update_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewComment>
pub async fn update_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewComment>
Update a review comment for a pull request.
This function performs a PATCH
to the /repos/{owner}/{repo}/pulls/comments/{comment_id}
endpoint.
Enables you to edit a review comment.
FROM: https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request
Parameters:
owner: &str
repo: &str
comment_id: i64
– comment_id parameter.
Get a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}
endpoint.
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.
Lists details of a pull request by providing its number.
When you get, create, or edit a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the mergeable
key. For more information, see “Checking mergeability of pull requests”.
The value of the mergeable
attribute can be true
, false
, or null
. If the value is null
, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null
value for the mergeable
attribute in the response. If mergeable
is true
, then merge_commit_sha
will be the SHA of the test merge commit.
The value of the merge_commit_sha
attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha
attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha
attribute changes depending on how you merged the pull request:
- If merged as a merge commit,
merge_commit_sha
represents the SHA of the merge commit. - If merged via a squash,
merge_commit_sha
represents the SHA of the squashed commit on the base branch. - If rebased,
merge_commit_sha
represents the commit that the base branch was updated to.
Pass the appropriate media type to fetch diff and patch formats.
FROM: https://docs.github.com/rest/reference/pulls#get-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn update(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsUpdateRequest
) -> Result<PullRequestData>
pub async fn update(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsUpdateRequest
) -> Result<PullRequestData>
Update a pull request.
This function performs a PATCH
to the /repos/{owner}/{repo}/pulls/{pull_number}
endpoint.
Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.
To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
FROM: https://docs.github.com/rest/reference/pulls/#update-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
List review comments on a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/comments
endpoint.
Lists all review comments for a pull request. By default, review comments are in ascending order by ID.
FROM: https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
sort: crate::types::Sort
– One ofcreated
(when the repository was starred) orupdated
(when it was last pushed to).direction: crate::types::Order
– The order of audit log events. To list newest events first, specifydesc
. To list oldest events first, specifyasc
.
The default is desc
.
since: chrono::DateTime<chrono::Utc>
– Only show notifications updated after the given time. This is a timestamp in ISO 8601 format:YYYY-MM-DDTHH:MM:SSZ
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
List review comments on a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/comments
endpoint.
As opposed to list_review_comments
, this function returns all the pages of the request at once.
Lists all review comments for a pull request. By default, review comments are in ascending order by ID.
FROM: https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request
pub async fn create_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsCreateReviewCommentRequest
) -> Result<PullRequestReviewComment>
pub async fn create_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsCreateReviewCommentRequest
) -> Result<PullRequestReviewComment>
Create a review comment for a pull request.
This function performs a POST
to the /repos/{owner}/{repo}/pulls/{pull_number}/comments
endpoint.
Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see “Create an issue comment.” We recommend creating a review comment using line
, side
, and optionally start_line
and start_side
if your comment applies to more than one line in the pull request diff.
You can still create a review comment using the position
parameter. When you use position
, the line
, side
, start_line
, and start_side
parameters are not required. For more information, see the comfort-fade
preview notice.
Note: The position value equals the number of lines down from the first “@@” hunk header in the file you want to add a comment. The line just below the “@@” line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn create_reply_for_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i64,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewComment>
pub async fn create_reply_for_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i64,
comment_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewComment>
Create a reply for a review comment.
This function performs a POST
to the /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
endpoint.
Creates a reply to a review comment for a pull request. For the comment_id
, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment
Parameters:
owner: &str
repo: &str
pull_number: i64
comment_id: i64
– comment_id parameter.
pub async fn list_commits(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<CommitDataType>>
pub async fn list_commits(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<CommitDataType>>
List commits on a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/commits
endpoint.
Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
FROM: https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all_commits(
&self,
owner: &str,
repo: &str,
pull_number: i64
) -> Result<Vec<CommitDataType>>
pub async fn list_all_commits(
&self,
owner: &str,
repo: &str,
pull_number: i64
) -> Result<Vec<CommitDataType>>
List commits on a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/commits
endpoint.
As opposed to list_commits
, this function returns all the pages of the request at once.
Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
FROM: https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request
List pull requests files.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/files
endpoint.
Note: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
FROM: https://docs.github.com/rest/reference/pulls#list-pull-requests-files
Parameters:
owner: &str
repo: &str
pull_number: i64
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
List pull requests files.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/files
endpoint.
As opposed to list_files
, this function returns all the pages of the request at once.
Note: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
FROM: https://docs.github.com/rest/reference/pulls#list-pull-requests-files
Check if a pull request has been merged.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/merge
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn merge(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsMergeRequest
) -> Result<PullRequestMergeResult>
pub async fn merge(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsMergeRequest
) -> Result<PullRequestMergeResult>
Merge a pull request.
This function performs a PUT
to the /repos/{owner}/{repo}/pulls/{pull_number}/merge
endpoint.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/pulls#merge-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn list_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<PullRequestReview>
pub async fn list_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<PullRequestReview>
List requested reviewers for a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn request_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsRequestReviewers
) -> Result<PullRequestSimple>
pub async fn request_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsRequestReviewers
) -> Result<PullRequestSimple>
Request reviewers for a pull request.
This function performs a POST
to the /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
endpoint.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
FROM: https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn remove_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsRemoveRequestedReviewersRequest
) -> Result<PullRequestSimple>
pub async fn remove_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsRemoveRequestedReviewersRequest
) -> Result<PullRequestSimple>
Remove requested reviewers from a pull request.
This function performs a DELETE
to the /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn list_reviews(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestReviewData>>
pub async fn list_reviews(
&self,
owner: &str,
repo: &str,
pull_number: i64,
per_page: i64,
page: i64
) -> Result<Vec<PullRequestReviewData>>
List reviews for a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews
endpoint.
The list of reviews returns in chronological order.
FROM: https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all_reviews(
&self,
owner: &str,
repo: &str,
pull_number: i64
) -> Result<Vec<PullRequestReviewData>>
pub async fn list_all_reviews(
&self,
owner: &str,
repo: &str,
pull_number: i64
) -> Result<Vec<PullRequestReviewData>>
List reviews for a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews
endpoint.
As opposed to list_reviews
, this function returns all the pages of the request at once.
The list of reviews returns in chronological order.
FROM: https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request
pub async fn create_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsCreateReviewRequest
) -> Result<PullRequestReviewData>
pub async fn create_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsCreateReviewRequest
) -> Result<PullRequestReviewData>
Create a review for a pull request.
This function performs a POST
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews
endpoint.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.
Pull request reviews created in the PENDING
state do not include the submitted_at
property in the response.
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. The GitHub REST API v3 offers the application/vnd.github.v3.diff
media type. To see a pull request diff, add this media type to the Accept
header of a call to the single pull request endpoint.
The position
value equals the number of lines down from the first “@@” hunk header in the file you want to add a comment. The line just below the “@@” line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
FROM: https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
pub async fn get_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<PullRequestReviewData>
pub async fn get_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<PullRequestReviewData>
Get a review for a pull request.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.
pub async fn update_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewData>
pub async fn update_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsUpdateReviewRequest
) -> Result<PullRequestReviewData>
Update a review for a pull request.
This function performs a PUT
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
endpoint.
Update the review summary comment with new text.
FROM: https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.
pub async fn delete_pending_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<PullRequestReviewData>
pub async fn delete_pending_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<PullRequestReviewData>
Delete a pending review for a pull request.
This function performs a DELETE
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.
List comments for a pull request review.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
endpoint.
List comments for a specific pull request review.
FROM: https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all_comments_for_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<Vec<ReviewComment>>
pub async fn list_all_comments_for_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64
) -> Result<Vec<ReviewComment>>
List comments for a pull request review.
This function performs a GET
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments
endpoint.
As opposed to list_comments_for_review
, this function returns all the pages of the request at once.
List comments for a specific pull request review.
FROM: https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review
pub async fn dismiss_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsDismissReviewRequest
) -> Result<PullRequestReviewData>
pub async fn dismiss_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsDismissReviewRequest
) -> Result<PullRequestReviewData>
Dismiss a review for a pull request.
This function performs a PUT
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals
endpoint.
Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
FROM: https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.
pub async fn submit_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsSubmitReviewRequest
) -> Result<PullRequestReviewData>
pub async fn submit_review(
&self,
owner: &str,
repo: &str,
pull_number: i64,
review_id: i64,
body: &PullsSubmitReviewRequest
) -> Result<PullRequestReviewData>
Submit a review for a pull request.
This function performs a POST
to the /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events
endpoint.
FROM: https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request
Parameters:
owner: &str
repo: &str
pull_number: i64
review_id: i64
– review_id parameter.
pub async fn update_branch(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsUpdateBranchRequest
) -> Result<PullsUpdateBranchResponse>
pub async fn update_branch(
&self,
owner: &str,
repo: &str,
pull_number: i64,
body: &PullsUpdateBranchRequest
) -> Result<PullsUpdateBranchResponse>
Update a pull request branch.
This function performs a PUT
to the /repos/{owner}/{repo}/pulls/{pull_number}/update-branch
endpoint.
Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
FROM: https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch
Parameters:
owner: &str
repo: &str
pull_number: i64