pub struct CreatePullRequestRequest {
pub title: String,
pub head: String,
pub base: String,
pub body: Option<String>,
pub draft: Option<bool>,
pub milestone: Option<u64>,
pub maintainer_can_modify: Option<bool>,
}Expand description
Request to create a new pull request.
Fields§
§title: StringPull request title (required)
head: StringHead branch (required) - format: “username:branch” for forks
base: StringBase branch (required)
body: Option<String>Pull request body content (Markdown)
draft: Option<bool>Whether to create as draft
milestone: Option<u64>Milestone number
maintainer_can_modify: Option<bool>Whether maintainers of the base repository can push to the head branch.
When true, maintainers of the base repository (contributors with push
access) can push commits to the head branch of this pull request, even
when the head branch lives in a fork. Defaults to true on the GitHub
API for fork-sourced pull requests when not provided.
§Example
use github_bot_sdk::client::CreatePullRequestRequest;
let request = CreatePullRequestRequest {
title: "My feature".to_string(),
head: "contributor:feature-branch".to_string(),
base: "main".to_string(),
body: None,
draft: None,
milestone: None,
maintainer_can_modify: Some(true),
};Trait Implementations§
Source§impl Clone for CreatePullRequestRequest
impl Clone for CreatePullRequestRequest
Source§fn clone(&self) -> CreatePullRequestRequest
fn clone(&self) -> CreatePullRequestRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreatePullRequestRequest
impl Debug for CreatePullRequestRequest
Auto Trait Implementations§
impl Freeze for CreatePullRequestRequest
impl RefUnwindSafe for CreatePullRequestRequest
impl Send for CreatePullRequestRequest
impl Sync for CreatePullRequestRequest
impl Unpin for CreatePullRequestRequest
impl UnsafeUnpin for CreatePullRequestRequest
impl UnwindSafe for CreatePullRequestRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more