pub struct Pulls { /* private fields */ }Expand description
The pull-request table. Cheap to clone; every clone is the same document.
Implementations§
Source§impl Pulls
impl Pulls
Sourcepub fn new(control: Arc<dyn ControlStore>) -> Result<Self>
pub fn new(control: Arc<dyn ControlStore>) -> Result<Self>
Open the table held in control.
Sourcepub fn create(
&self,
repo: &str,
author: &str,
title: &str,
description: &str,
source_ref: &str,
target_ref: &str,
source_oid: &str,
) -> Result<PullRecord>
pub fn create( &self, repo: &str, author: &str, title: &str, description: &str, source_ref: &str, target_ref: &str, source_oid: &str, ) -> Result<PullRecord>
Open a pull request. The number is minted inside the document CAS, so two racing creates get two numbers.
Sourcepub fn list(
&self,
repo: &str,
state: Option<PullState>,
) -> Result<Vec<PullRecord>>
pub fn list( &self, repo: &str, state: Option<PullState>, ) -> Result<Vec<PullRecord>>
Every pull in one repository, newest first, optionally one state only.
Sourcepub fn close(&self, repo: &str, number: u64) -> Result<Transition>
pub fn close(&self, repo: &str, number: u64) -> Result<Transition>
Close an open pull. Never a merge: closing records a decision NOT to.
Sourcepub fn mark_merged(
&self,
repo: &str,
number: u64,
merge_oid: &str,
) -> Result<Transition>
pub fn mark_merged( &self, repo: &str, number: u64, merge_oid: &str, ) -> Result<Transition>
Record that the target ref has ALREADY moved to merge_oid.
Called after the ref update commits, never before: a record that says merged while the CAS lost its race is a lie with an audit trail.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Pulls
impl !UnwindSafe for Pulls
impl Freeze for Pulls
impl Send for Pulls
impl Sync for Pulls
impl Unpin for Pulls
impl UnsafeUnpin for Pulls
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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