pub struct RawPullRequest { /* private fields */ }Expand description
One open pull request, as the tracker returned it.
Constructed only from a listing. Text is held, never handed out: see the module docs.
Implementations§
Source§impl RawPullRequest
impl RawPullRequest
pub fn repo(&self) -> &str
pub fn number(&self) -> u64
The one unforgeable-by-body input: who GitHub says opened this.
pub fn checks(&self) -> ChecksState
pub fn is_draft(&self) -> bool
Sourcepub fn has_label(&self, label: &str) -> bool
pub fn has_label(&self, label: &str) -> bool
Whether a label is present. A predicate, not a listing: the loop asks “is this opted in”, never “what does this say”.
Sourcepub fn changes_requested(&self) -> bool
pub fn changes_requested(&self) -> bool
Whether reviewers explicitly requested changes.
Sourcepub fn references_issue(&self, number: u64) -> bool
pub fn references_issue(&self, number: u64) -> bool
Whether this pull request references issue number in the way GitHub
itself recognises for linking.
A predicate over held text rather than an accessor, so the body can answer “does an open pull request already cover this issue” without becoming something a caller can paste into a prompt.
Deliberately literal: it matches #N on a word boundary and nothing
cleverer. A false negative costs a duplicate pull request, which a human
closes; a false positive silently drops an issue from the queue forever,
which nobody notices. The cheap failure is the right one to prefer.
Sourcepub fn references(&self, repo: Option<&str>, number: u64) -> bool
pub fn references(&self, repo: Option<&str>, number: u64) -> bool
Whether this references repo#number, matching the bare #N form and
the cross-repo owner/name#N form.
When repo is Some, a bare #N is deliberately NOT accepted: on the
fix repo, #N means issue N of that repo, and reading it as the
tracker’s issue N would silently drop an unrelated issue from the queue
forever.
Trait Implementations§
Source§impl Clone for RawPullRequest
impl Clone for RawPullRequest
Auto Trait Implementations§
impl Freeze for RawPullRequest
impl RefUnwindSafe for RawPullRequest
impl Send for RawPullRequest
impl Sync for RawPullRequest
impl Unpin for RawPullRequest
impl UnsafeUnpin for RawPullRequest
impl UnwindSafe for RawPullRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more