pub struct GitHubProjectSource { /* private fields */ }Expand description
Reads issues on an org’s Projects v2 board, with their Status column mapped
to a normalized state category via [StateMapping].
Implementations§
Source§impl GitHubProjectSource
impl GitHubProjectSource
Sourcepub fn new(
org: impl Into<String>,
number: u32,
token: impl Into<String>,
mapping: StateMapping,
) -> Result<Self>
pub fn new( org: impl Into<String>, number: u32, token: impl Into<String>, mapping: StateMapping, ) -> Result<Self>
Create a board source for org / project number, authenticating with
token, resolving Status via mapping.
Sourcepub fn with_write_targets(
self,
targets: BTreeMap<StateCategory, String>,
) -> Self
pub fn with_write_targets( self, targets: BTreeMap<StateCategory, String>, ) -> Self
Set the category→column overrides used by set_state for boards where
two columns share a category (the reverse of state_map is ambiguous).
Trait Implementations§
Source§impl TicketSource for GitHubProjectSource
impl TicketSource for GitHubProjectSource
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Ticket>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Ticket>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a ticket by uid. Note: this scans the whole board (every page)
on each call — intended for occasional single lookups on a small board,
not for calling in a loop. Bulk consumers should use fetch_changed.
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
What this source supports. Callers consult this before attempting writes.
Source§fn fetch_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
_cursor: &'life1 Cursor,
) -> Pin<Box<dyn Future<Output = Result<Page>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
_cursor: &'life1 Cursor,
) -> Pin<Box<dyn Future<Output = Result<Page>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Tickets changed since
cursor (or all tickets, if the cursor is empty),
plus the cursor to resume incremental sync from.Source§fn set_state<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
target: StateCategory,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_state<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
target: StateCategory,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Move a ticket to a normalized [
StateCategory]. The source resolves this
to its native mechanism (a Jira transition, a GitLab label swap, an Asana
section move). Capability-gated: defaults to Unsupported.§fn comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_uid: &'life1 str,
_body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_uid: &'life1 str,
_body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Append a comment to a ticket. Capability-gated: defaults to
Unsupported.Auto Trait Implementations§
impl Freeze for GitHubProjectSource
impl !RefUnwindSafe for GitHubProjectSource
impl Send for GitHubProjectSource
impl Sync for GitHubProjectSource
impl Unpin for GitHubProjectSource
impl UnsafeUnpin for GitHubProjectSource
impl !UnwindSafe for GitHubProjectSource
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