Skip to main content

post_pr_review

Function post_pr_review 

Source
pub async fn post_pr_review(
    client: &Octocrab,
    owner: &str,
    repo: &str,
    number: u64,
    body: &str,
    event: ReviewEvent,
) -> Result<u64>
Expand description

Posts a PR review to GitHub.

Uses Octocrab’s custom HTTP POST to create a review with the specified event type. Requires write access to the repository.

§Arguments

  • client - Authenticated Octocrab client
  • owner - Repository owner
  • repo - Repository name
  • number - PR number
  • body - Review comment text
  • event - Review event type (Comment, Approve, or RequestChanges)

§Returns

Review ID on success.

§Errors

Returns an error if the API call fails, user lacks write access, or PR is not found.