pub struct Pulls<'api, C: Client>{ /* private fields */ }Implementations§
Source§impl<'api, C: Client> Pulls<'api, C>
impl<'api, C: Client> Pulls<'api, C>
Sourcepub async fn check_if_merged_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<(), AdapterError>
pub async fn check_if_merged_async( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<(), AdapterError>
§Check if a pull request has been merged
Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.
GitHub API docs for check_if_merged
Sourcepub fn check_if_merged(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<(), AdapterError>
pub fn check_if_merged( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<(), AdapterError>
§Check if a pull request has been merged
Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.
GitHub API docs for check_if_merged
Sourcepub async fn create_async(
&self,
owner: &str,
repo: &str,
body: PostPullsCreate,
) -> Result<PullRequest, AdapterError>
pub async fn create_async( &self, owner: &str, repo: &str, body: PostPullsCreate, ) -> Result<PullRequest, AdapterError>
§Create a pull request
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.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub fn create(
&self,
owner: &str,
repo: &str,
body: PostPullsCreate,
) -> Result<PullRequest, AdapterError>
pub fn create( &self, owner: &str, repo: &str, body: PostPullsCreate, ) -> Result<PullRequest, AdapterError>
§Create a pull request
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.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub async fn create_reply_for_review_comment_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
comment_id: i64,
body: PostPullsCreateReplyForReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub async fn create_reply_for_review_comment_async( &self, owner: &str, repo: &str, pull_number: i32, comment_id: i64, body: PostPullsCreateReplyForReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Create a reply for a review comment
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. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_reply_for_review_comment
Sourcepub fn create_reply_for_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i32,
comment_id: i64,
body: PostPullsCreateReplyForReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub fn create_reply_for_review_comment( &self, owner: &str, repo: &str, pull_number: i32, comment_id: i64, body: PostPullsCreateReplyForReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Create a reply for a review comment
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. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_reply_for_review_comment
Sourcepub async fn create_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsCreateReview,
) -> Result<PullRequestReview, AdapterError>
pub async fn create_review_async( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsCreateReview, ) -> Result<PullRequestReview, AdapterError>
§Create a review for a pull request
Creates a review on a specified pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
Pull request reviews created in the PENDING state are not submitted and therefore do not include the submitted_at property in the response. To create a pending review for a pull request, leave the event parameter blank. For more information about submitting a PENDING review, see “Submit a review for a pull request.”
[!NOTE] To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the
application/vnd.github.v3.diffmedia type to theAcceptheader of a call to the Get a 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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_review
Sourcepub fn create_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsCreateReview,
) -> Result<PullRequestReview, AdapterError>
pub fn create_review( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsCreateReview, ) -> Result<PullRequestReview, AdapterError>
§Create a review for a pull request
Creates a review on a specified pull request.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
Pull request reviews created in the PENDING state are not submitted and therefore do not include the submitted_at property in the response. To create a pending review for a pull request, leave the event parameter blank. For more information about submitting a PENDING review, see “Submit a review for a pull request.”
[!NOTE] To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the
application/vnd.github.v3.diffmedia type to theAcceptheader of a call to the Get a 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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_review
Sourcepub async fn create_review_comment_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsCreateReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub async fn create_review_comment_async( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsCreateReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Create a review comment for a pull request
Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see “Create an issue comment.”
If your comment applies to more than one line in the pull request diff, you should use the parameters line, side, and optionally start_line and start_side in your request.
The position parameter is closing down. If you use position, the line, side, start_line, and start_side parameters are not required.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_review_comment
Sourcepub fn create_review_comment(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsCreateReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub fn create_review_comment( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsCreateReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Create a review comment for a pull request
Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see “Create an issue comment.”
If your comment applies to more than one line in the pull request diff, you should use the parameters line, side, and optionally start_line and start_side in your request.
The position parameter is closing down. If you use position, the line, side, start_line, and start_side parameters are not required.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for create_review_comment
Sourcepub async fn delete_pending_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
) -> Result<PullRequestReview, AdapterError>
pub async fn delete_pending_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, ) -> Result<PullRequestReview, AdapterError>
§Delete a pending review for a pull request
Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for delete_pending_review
Sourcepub fn delete_pending_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
) -> Result<PullRequestReview, AdapterError>
pub fn delete_pending_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, ) -> Result<PullRequestReview, AdapterError>
§Delete a pending review for a pull request
Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for delete_pending_review
Sourcepub async fn delete_review_comment_async(
&self,
owner: &str,
repo: &str,
comment_id: i64,
) -> Result<(), AdapterError>
pub async fn delete_review_comment_async( &self, owner: &str, repo: &str, comment_id: i64, ) -> Result<(), AdapterError>
§Delete a review comment for a pull request
Deletes a review comment.
GitHub API docs for delete_review_comment
Sourcepub fn delete_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
) -> Result<(), AdapterError>
pub fn delete_review_comment( &self, owner: &str, repo: &str, comment_id: i64, ) -> Result<(), AdapterError>
§Delete a review comment for a pull request
Deletes a review comment.
GitHub API docs for delete_review_comment
Sourcepub async fn dismiss_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PutPullsDismissReview,
) -> Result<PullRequestReview, AdapterError>
pub async fn dismiss_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PutPullsDismissReview, ) -> Result<PullRequestReview, AdapterError>
§Dismiss a review for a pull request
Dismisses a specified review on a pull request.
[!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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for dismiss_review
Sourcepub fn dismiss_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PutPullsDismissReview,
) -> Result<PullRequestReview, AdapterError>
pub fn dismiss_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PutPullsDismissReview, ) -> Result<PullRequestReview, AdapterError>
§Dismiss a review for a pull request
Dismisses a specified review on a pull request.
[!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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for dismiss_review
Sourcepub async fn get_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<PullRequest, AdapterError>
pub async fn get_async( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<PullRequest, AdapterError>
§Get a pull request
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_sharepresents the SHA of the merge commit. - If merged via a squash,
merge_commit_sharepresents the SHA of the squashed commit on the base branch. - If rebased,
merge_commit_sharepresents the commit that the base branch was updated to.
Pass the appropriate media type to fetch diff and patch formats.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.application/vnd.github.diff: For more information, see “git-diff” in the Git documentation. If a diff is corrupt, contact us through the GitHub Support portal. Include the repository name and pull request ID in your message.
Sourcepub fn get(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<PullRequest, AdapterError>
pub fn get( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<PullRequest, AdapterError>
§Get a pull request
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_sharepresents the SHA of the merge commit. - If merged via a squash,
merge_commit_sharepresents the SHA of the squashed commit on the base branch. - If rebased,
merge_commit_sharepresents the commit that the base branch was updated to.
Pass the appropriate media type to fetch diff and patch formats.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.application/vnd.github.diff: For more information, see “git-diff” in the Git documentation. If a diff is corrupt, contact us through the GitHub Support portal. Include the repository name and pull request ID in your message.
Sourcepub async fn get_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
) -> Result<PullRequestReview, AdapterError>
pub async fn get_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, ) -> Result<PullRequestReview, AdapterError>
§Get a review for a pull request
Retrieves a pull request review by its ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for get_review
Sourcepub fn get_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
) -> Result<PullRequestReview, AdapterError>
pub fn get_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, ) -> Result<PullRequestReview, AdapterError>
§Get a review for a pull request
Retrieves a pull request review by its ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for get_review
Sourcepub async fn get_review_comment_async(
&self,
owner: &str,
repo: &str,
comment_id: i64,
) -> Result<PullRequestReviewComment, AdapterError>
pub async fn get_review_comment_async( &self, owner: &str, repo: &str, comment_id: i64, ) -> Result<PullRequestReviewComment, AdapterError>
§Get a review comment for a pull request
Provides details for a specified review comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for get_review_comment
Sourcepub fn get_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
) -> Result<PullRequestReviewComment, AdapterError>
pub fn get_review_comment( &self, owner: &str, repo: &str, comment_id: i64, ) -> Result<PullRequestReviewComment, AdapterError>
§Get a review comment for a pull request
Provides details for a specified review comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for get_review_comment
Sourcepub async fn list_async(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<PullsListParams<'api>>>,
) -> Result<Vec<PullRequestSimple>, AdapterError>
pub async fn list_async( &self, owner: &str, repo: &str, query_params: Option<impl Into<PullsListParams<'api>>>, ) -> Result<Vec<PullRequestSimple>, AdapterError>
§List pull requests
Lists pull requests in a specified repository.
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub fn list(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<PullsListParams<'api>>>,
) -> Result<Vec<PullRequestSimple>, AdapterError>
pub fn list( &self, owner: &str, repo: &str, query_params: Option<impl Into<PullsListParams<'api>>>, ) -> Result<Vec<PullRequestSimple>, AdapterError>
§List pull requests
Lists pull requests in a specified repository.
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub async fn list_comments_for_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
query_params: Option<impl Into<PullsListCommentsForReviewParams>>,
) -> Result<Vec<ReviewComment>, AdapterError>
pub async fn list_comments_for_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, query_params: Option<impl Into<PullsListCommentsForReviewParams>>, ) -> Result<Vec<ReviewComment>, AdapterError>
§List comments for a pull request review
Lists comments for a specific pull request review.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_comments_for_review
Sourcepub fn list_comments_for_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
query_params: Option<impl Into<PullsListCommentsForReviewParams>>,
) -> Result<Vec<ReviewComment>, AdapterError>
pub fn list_comments_for_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, query_params: Option<impl Into<PullsListCommentsForReviewParams>>, ) -> Result<Vec<ReviewComment>, AdapterError>
§List comments for a pull request review
Lists comments for a specific pull request review.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_comments_for_review
Sourcepub async fn list_commits_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListCommitsParams>>,
) -> Result<Vec<Commit>, AdapterError>
pub async fn list_commits_async( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListCommitsParams>>, ) -> Result<Vec<Commit>, AdapterError>
§List commits on a pull request
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_commits
Sourcepub fn list_commits(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListCommitsParams>>,
) -> Result<Vec<Commit>, AdapterError>
pub fn list_commits( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListCommitsParams>>, ) -> Result<Vec<Commit>, AdapterError>
§List commits on a pull request
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_commits
Sourcepub async fn list_files_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListFilesParams>>,
) -> Result<Vec<DiffEntry>, AdapterError>
pub async fn list_files_async( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListFilesParams>>, ) -> Result<Vec<DiffEntry>, AdapterError>
§List pull requests files
Lists the files in a specified pull request.
[!NOTE] Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_files
Sourcepub fn list_files(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListFilesParams>>,
) -> Result<Vec<DiffEntry>, AdapterError>
pub fn list_files( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListFilesParams>>, ) -> Result<Vec<DiffEntry>, AdapterError>
§List pull requests files
Lists the files in a specified pull request.
[!NOTE] Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_files
Sourcepub async fn list_requested_reviewers_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<PullRequestReviewRequest, AdapterError>
pub async fn list_requested_reviewers_async( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<PullRequestReviewRequest, AdapterError>
§Get all requested reviewers for a pull request
Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the List reviews for a pull request operation.
GitHub API docs for list_requested_reviewers
Sourcepub fn list_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i32,
) -> Result<PullRequestReviewRequest, AdapterError>
pub fn list_requested_reviewers( &self, owner: &str, repo: &str, pull_number: i32, ) -> Result<PullRequestReviewRequest, AdapterError>
§Get all requested reviewers for a pull request
Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the List reviews for a pull request operation.
GitHub API docs for list_requested_reviewers
Sourcepub async fn list_review_comments_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListReviewCommentsParams<'api>>>,
) -> Result<Vec<PullRequestReviewComment>, AdapterError>
pub async fn list_review_comments_async( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListReviewCommentsParams<'api>>>, ) -> Result<Vec<PullRequestReviewComment>, AdapterError>
§List review comments on a pull request
Lists all review comments for a specified pull request. By default, review comments are in ascending order by ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_review_comments
Sourcepub fn list_review_comments(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListReviewCommentsParams<'api>>>,
) -> Result<Vec<PullRequestReviewComment>, AdapterError>
pub fn list_review_comments( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListReviewCommentsParams<'api>>>, ) -> Result<Vec<PullRequestReviewComment>, AdapterError>
§List review comments on a pull request
Lists all review comments for a specified pull request. By default, review comments are in ascending order by ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_review_comments
Sourcepub async fn list_review_comments_for_repo_async(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<PullsListReviewCommentsForRepoParams<'api>>>,
) -> Result<Vec<PullRequestReviewComment>, AdapterError>
pub async fn list_review_comments_for_repo_async( &self, owner: &str, repo: &str, query_params: Option<impl Into<PullsListReviewCommentsForRepoParams<'api>>>, ) -> Result<Vec<PullRequestReviewComment>, AdapterError>
§List review comments in a repository
Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_review_comments_for_repo
Sourcepub fn list_review_comments_for_repo(
&self,
owner: &str,
repo: &str,
query_params: Option<impl Into<PullsListReviewCommentsForRepoParams<'api>>>,
) -> Result<Vec<PullRequestReviewComment>, AdapterError>
pub fn list_review_comments_for_repo( &self, owner: &str, repo: &str, query_params: Option<impl Into<PullsListReviewCommentsForRepoParams<'api>>>, ) -> Result<Vec<PullRequestReviewComment>, AdapterError>
§List review comments in a repository
Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_review_comments_for_repo
Sourcepub async fn list_reviews_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListReviewsParams>>,
) -> Result<Vec<PullRequestReview>, AdapterError>
pub async fn list_reviews_async( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListReviewsParams>>, ) -> Result<Vec<PullRequestReview>, AdapterError>
§List reviews for a pull request
Lists all reviews for a specified pull request. The list of reviews returns in chronological order.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_reviews
Sourcepub fn list_reviews(
&self,
owner: &str,
repo: &str,
pull_number: i32,
query_params: Option<impl Into<PullsListReviewsParams>>,
) -> Result<Vec<PullRequestReview>, AdapterError>
pub fn list_reviews( &self, owner: &str, repo: &str, pull_number: i32, query_params: Option<impl Into<PullsListReviewsParams>>, ) -> Result<Vec<PullRequestReview>, AdapterError>
§List reviews for a pull request
Lists all reviews for a specified pull request. The list of reviews returns in chronological order.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for list_reviews
Sourcepub async fn merge_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PutPullsMerge,
) -> Result<PullRequestMergeResult, AdapterError>
pub async fn merge_async( &self, owner: &str, repo: &str, pull_number: i32, body: PutPullsMerge, ) -> Result<PullRequestMergeResult, AdapterError>
§Merge a pull request
Merges a pull request into the base branch. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
Sourcepub fn merge(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PutPullsMerge,
) -> Result<PullRequestMergeResult, AdapterError>
pub fn merge( &self, owner: &str, repo: &str, pull_number: i32, body: PutPullsMerge, ) -> Result<PullRequestMergeResult, AdapterError>
§Merge a pull request
Merges a pull request into the base branch. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
Sourcepub async fn remove_requested_reviewers_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: DeletePullsRemoveRequestedReviewers,
) -> Result<PullRequestSimple, AdapterError>
pub async fn remove_requested_reviewers_async( &self, owner: &str, repo: &str, pull_number: i32, body: DeletePullsRemoveRequestedReviewers, ) -> Result<PullRequestSimple, AdapterError>
§Remove requested reviewers from a pull request
Removes review requests from a pull request for a given set of users and/or teams.
GitHub API docs for remove_requested_reviewers
Sourcepub fn remove_requested_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: DeletePullsRemoveRequestedReviewers,
) -> Result<PullRequestSimple, AdapterError>
pub fn remove_requested_reviewers( &self, owner: &str, repo: &str, pull_number: i32, body: DeletePullsRemoveRequestedReviewers, ) -> Result<PullRequestSimple, AdapterError>
§Remove requested reviewers from a pull request
Removes review requests from a pull request for a given set of users and/or teams.
GitHub API docs for remove_requested_reviewers
Sourcepub async fn request_reviewers_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsRequestReviewers,
) -> Result<PullRequestSimple, AdapterError>
pub async fn request_reviewers_async( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsRequestReviewers, ) -> Result<PullRequestSimple, AdapterError>
§Request reviewers for a pull request
Requests reviews for a pull request from a given set of users and/or teams. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
GitHub API docs for request_reviewers
Sourcepub fn request_reviewers(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PostPullsRequestReviewers,
) -> Result<PullRequestSimple, AdapterError>
pub fn request_reviewers( &self, owner: &str, repo: &str, pull_number: i32, body: PostPullsRequestReviewers, ) -> Result<PullRequestSimple, AdapterError>
§Request reviewers for a pull request
Requests reviews for a pull request from a given set of users and/or teams. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see “Rate limits for the API” and “Best practices for using the REST API.”
GitHub API docs for request_reviewers
Sourcepub async fn submit_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PostPullsSubmitReview,
) -> Result<PullRequestReview, AdapterError>
pub async fn submit_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PostPullsSubmitReview, ) -> Result<PullRequestReview, AdapterError>
§Submit a review for a pull request
Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see “Create a review for a pull request.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for submit_review
Sourcepub fn submit_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PostPullsSubmitReview,
) -> Result<PullRequestReview, AdapterError>
pub fn submit_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PostPullsSubmitReview, ) -> Result<PullRequestReview, AdapterError>
§Submit a review for a pull request
Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see “Create a review for a pull request.”
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for submit_review
Sourcepub async fn update_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PatchPullsUpdate,
) -> Result<PullRequest, AdapterError>
pub async fn update_async( &self, owner: &str, repo: &str, pull_number: i32, body: PatchPullsUpdate, ) -> Result<PullRequest, AdapterError>
§Update a pull request
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub fn update(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PatchPullsUpdate,
) -> Result<PullRequest, AdapterError>
pub fn update( &self, owner: &str, repo: &str, pull_number: i32, body: PatchPullsUpdate, ) -> Result<PullRequest, AdapterError>
§Update a pull request
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.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Sourcepub async fn update_branch_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PutPullsUpdateBranch,
) -> Result<PutPullsUpdateBranchResponse202, AdapterError>
pub async fn update_branch_async( &self, owner: &str, repo: &str, pull_number: i32, body: PutPullsUpdateBranch, ) -> Result<PutPullsUpdateBranchResponse202, AdapterError>
§Update a pull request branch
Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository.
GitHub API docs for update_branch
Sourcepub fn update_branch(
&self,
owner: &str,
repo: &str,
pull_number: i32,
body: PutPullsUpdateBranch,
) -> Result<PutPullsUpdateBranchResponse202, AdapterError>
pub fn update_branch( &self, owner: &str, repo: &str, pull_number: i32, body: PutPullsUpdateBranch, ) -> Result<PutPullsUpdateBranchResponse202, AdapterError>
§Update a pull request branch
Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository.
GitHub API docs for update_branch
Sourcepub async fn update_review_async(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PutPullsUpdateReview,
) -> Result<PullRequestReview, AdapterError>
pub async fn update_review_async( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PutPullsUpdateReview, ) -> Result<PullRequestReview, AdapterError>
§Update a review for a pull request
Updates the contents of a specified review summary comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for update_review
Sourcepub fn update_review(
&self,
owner: &str,
repo: &str,
pull_number: i32,
review_id: i32,
body: PutPullsUpdateReview,
) -> Result<PullRequestReview, AdapterError>
pub fn update_review( &self, owner: &str, repo: &str, pull_number: i32, review_id: i32, body: PutPullsUpdateReview, ) -> Result<PullRequestReview, AdapterError>
§Update a review for a pull request
Updates the contents of a specified review summary comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for update_review
Sourcepub async fn update_review_comment_async(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: PatchPullsUpdateReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub async fn update_review_comment_async( &self, owner: &str, repo: &str, comment_id: i64, body: PatchPullsUpdateReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Update a review comment for a pull request
Edits the content of a specified review comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for update_review_comment
Sourcepub fn update_review_comment(
&self,
owner: &str,
repo: &str,
comment_id: i64,
body: PatchPullsUpdateReviewComment,
) -> Result<PullRequestReviewComment, AdapterError>
pub fn update_review_comment( &self, owner: &str, repo: &str, comment_id: i64, body: PatchPullsUpdateReviewComment, ) -> Result<PullRequestReviewComment, AdapterError>
§Update a review comment for a pull request
Edits the content of a specified review comment.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
GitHub API docs for update_review_comment