Struct octorust::pulls::Pulls

source ·
pub struct Pulls {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

source§

impl Pulls

source

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<Response<Vec<PullRequestSimple>>, ClientError>

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 either open, closed, or all.
  • head: &str – Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.
  • base: &str – Filter pulls by base branch name. Example: gh-pages.
  • sort: crate::types::PullsListSort – What to sort results by. Can be either created, updated, popularity (comment count) or long-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, specify desc. To list oldest events first, specify asc.

The default is desc.

  • per_page: i64 – Results per page (max 100).
  • page: i64 – Page number of the results to fetch.
source

pub async fn list_all( &self, owner: &str, repo: &str, state: IssuesListState, head: &str, base: &str, sort: PullsListSort, direction: Order ) -> Result<Response<Vec<PullRequestSimple>>, ClientError>

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

source

pub async fn create( &self, owner: &str, repo: &str, body: &PullsCreateRequest ) -> Result<Response<PullRequestData>, ClientError>

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
source

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<Response<Vec<PullRequestReviewComment>>, ClientError>

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, specify desc. To list oldest events first, specify asc.

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.
source

pub async fn list_all_review_comments_for_repo( &self, owner: &str, repo: &str, sort: PullsListReviewCommentsRepoSort, direction: Order, since: Option<DateTime<Utc>> ) -> Result<Response<Vec<PullRequestReviewComment>>, ClientError>

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

source

pub async fn get_review_comment( &self, owner: &str, repo: &str, comment_id: i64 ) -> Result<Response<PullRequestReviewComment>, ClientError>

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.
source

pub async fn delete_review_comment( &self, owner: &str, repo: &str, comment_id: i64 ) -> Result<Response<()>, ClientError>

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.
source

pub async fn update_review_comment( &self, owner: &str, repo: &str, comment_id: i64, body: &PullsUpdateReviewRequest ) -> Result<Response<PullRequestReviewComment>, ClientError>

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.
source

pub async fn get( &self, owner: &str, repo: &str, pull_number: i64 ) -> Result<Response<PullRequestData>, ClientError>

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
source

pub async fn update( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsUpdateRequest ) -> Result<Response<PullRequestData>, ClientError>

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
source

pub async fn list_review_comments( &self, owner: &str, repo: &str, pull_number: i64, sort: Sort, direction: Order, since: Option<DateTime<Utc>>, per_page: i64, page: i64 ) -> Result<Response<Vec<PullRequestReviewComment>>, ClientError>

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 of created (when the repository was starred) or updated (when it was last pushed to).
  • direction: crate::types::Order – The order of audit log events. To list newest events first, specify desc. To list oldest events first, specify asc.

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.
source

pub async fn list_all_review_comments( &self, owner: &str, repo: &str, pull_number: i64, sort: Sort, direction: Order, since: Option<DateTime<Utc>> ) -> Result<Response<Vec<PullRequestReviewComment>>, ClientError>

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

source

pub async fn create_review_comment( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsCreateReviewCommentRequest ) -> Result<Response<PullRequestReviewComment>, ClientError>

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
source

pub async fn create_reply_for_review_comment( &self, owner: &str, repo: &str, pull_number: i64, comment_id: i64, body: &PullsUpdateReviewRequest ) -> Result<Response<PullRequestReviewComment>, ClientError>

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.
source

pub async fn list_commits( &self, owner: &str, repo: &str, pull_number: i64, per_page: i64, page: i64 ) -> Result<Response<Vec<CommitDataType>>, ClientError>

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.
source

pub async fn list_all_commits( &self, owner: &str, repo: &str, pull_number: i64 ) -> Result<Response<Vec<CommitDataType>>, ClientError>

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

source

pub async fn list_files( &self, owner: &str, repo: &str, pull_number: i64, per_page: i64, page: i64 ) -> Result<Response<Vec<DiffEntry>>, ClientError>

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.
source

pub async fn list_all_files( &self, owner: &str, repo: &str, pull_number: i64 ) -> Result<Response<Vec<DiffEntry>>, ClientError>

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

source

pub async fn check_if_merged( &self, owner: &str, repo: &str, pull_number: i64 ) -> Result<Response<()>, ClientError>

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
source

pub async fn merge( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsMergeRequest ) -> Result<Response<PullRequestMergeResult>, ClientError>

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
source

pub async fn list_requested_reviewers( &self, owner: &str, repo: &str, pull_number: i64, per_page: i64, page: i64 ) -> Result<Response<PullRequestReview>, ClientError>

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.
source

pub async fn request_reviewers( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsRequestReviewers ) -> Result<Response<PullRequestSimple>, ClientError>

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
source

pub async fn remove_requested_reviewers( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsRemoveRequestedReviewersRequest ) -> Result<Response<PullRequestSimple>, ClientError>

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
source

pub async fn list_reviews( &self, owner: &str, repo: &str, pull_number: i64, per_page: i64, page: i64 ) -> Result<Response<Vec<PullRequestReviewData>>, ClientError>

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.
source

pub async fn list_all_reviews( &self, owner: &str, repo: &str, pull_number: i64 ) -> Result<Response<Vec<PullRequestReviewData>>, ClientError>

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

source

pub async fn create_review( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsCreateReviewRequest ) -> Result<Response<PullRequestReviewData>, ClientError>

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
source

pub async fn get_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64 ) -> Result<Response<PullRequestReviewData>, ClientError>

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.
source

pub async fn update_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64, body: &PullsUpdateReviewRequest ) -> Result<Response<PullRequestReviewData>, ClientError>

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.
source

pub async fn delete_pending_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64 ) -> Result<Response<PullRequestReviewData>, ClientError>

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.
source

pub async fn list_comments_for_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64, per_page: i64, page: i64 ) -> Result<Response<Vec<ReviewComment>>, ClientError>

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.
source

pub async fn list_all_comments_for_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64 ) -> Result<Response<Vec<ReviewComment>>, ClientError>

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

source

pub async fn dismiss_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64, body: &PullsDismissReviewRequest ) -> Result<Response<PullRequestReviewData>, ClientError>

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.
source

pub async fn submit_review( &self, owner: &str, repo: &str, pull_number: i64, review_id: i64, body: &PullsSubmitReviewRequest ) -> Result<Response<PullRequestReviewData>, ClientError>

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.
source

pub async fn update_branch( &self, owner: &str, repo: &str, pull_number: i64, body: &PullsUpdateBranchRequest ) -> Result<Response<PullsUpdateBranchResponse>, ClientError>

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

Auto Trait Implementations§

§

impl !RefUnwindSafe for Pulls

§

impl Send for Pulls

§

impl Sync for Pulls

§

impl Unpin for Pulls

§

impl !UnwindSafe for Pulls

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more