#[non_exhaustive]pub struct PullRequest {Show 13 fields
pub number: u64,
pub title: String,
pub state: String,
pub is_draft: bool,
pub head_ref_name: String,
pub base_ref_name: String,
pub url: String,
pub labels: Vec<String>,
pub assignees: Vec<String>,
pub author: String,
pub created_at: String,
pub updated_at: String,
pub milestone: Option<String>,
}Expand description
A pull request
(gh pr list/view --json number,title,state,isDraft,headRefName,baseRefName,url).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.number: u64PR number.
title: StringPR title.
state: StringState, e.g. "OPEN", "MERGED", "CLOSED".
is_draft: boolWhether the PR is a draft (gh --json isDraft).
head_ref_name: StringSource (head) branch name.
base_ref_name: StringTarget (base) branch name.
url: StringWeb URL.
labels: Vec<String>Labels attached to the PR (gh --json labels, flattened from
[{"name": "bug", ...}] to plain names).
assignees: Vec<String>Logins of assigned users (gh --json assignees, flattened from
[{"login": "octocat", ...}] to plain logins).
Author’s login (gh --json author, flattened from {"login": …}; a
deleted account’s null author becomes an empty string, matching the
existing PR feedback author flatten).
created_at: StringCreation timestamp (RFC 3339) (gh --json createdAt).
updated_at: StringLast-update timestamp (RFC 3339) (gh --json updatedAt).
milestone: Option<String>Milestone title, or None when no milestone is attached (gh --json milestone, flattened from {"title": …}; a null milestone becomes
None).
Trait Implementations§
Source§impl Clone for PullRequest
impl Clone for PullRequest
Source§fn clone(&self) -> PullRequest
fn clone(&self) -> PullRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more