pub async fn create_pull_request(
client: &Octocrab,
owner: &str,
repo: &str,
title: &str,
head_branch: &str,
base_branch: &str,
body: Option<&str>,
draft: bool,
) -> Result<PrCreateResult>Expand description
Creates a pull request on GitHub.
§Arguments
client- Authenticated Octocrab clientowner- Repository ownerrepo- Repository nametitle- PR titlehead_branch- Head branch (the branch with changes)base_branch- Base branch (the branch to merge into)body- Optional PR body text
§Returns
PrCreateResult with PR metadata.
§Errors
Returns an error if the API call fails or the user lacks write access.