pub async fn create_pr(
provider: &dyn TokenProvider,
owner: &str,
repo: &str,
title: &str,
base_branch: &str,
head_branch: &str,
body: Option<&str>,
) -> Result<PrCreateResult>Expand description
Creates a pull request on GitHub.
§Arguments
provider- Token provider for GitHub credentialsowner- Repository ownerrepo- Repository nametitle- PR titlebase_branch- Base branch (the branch to merge into)head_branch- Head branch (the branch with changes)body- Optional PR body text
§Returns
PrCreateResult with PR metadata.
§Errors
Returns an error if:
- GitHub token is not available from the provider
- GitHub API call fails
- User lacks write access to the repository