Skip to main content

TrackerAdapter

Trait TrackerAdapter 

Source
pub trait TrackerAdapter {
    // Required methods
    fn tool(&self) -> Tool;
    fn create_issue(
        &mut self,
        title: &str,
        body: &str,
        labels: &[String],
        assignee: Option<&str>,
        priority: Option<&str>,
        status: &str,
    ) -> Result<String>;
    fn update_issue(
        &mut self,
        remote_ref: &str,
        title: &str,
        body: &str,
        labels: &[String],
        assignee: Option<&str>,
        priority: Option<&str>,
        status: &str,
    ) -> Result<()>;
    fn mark_done(&mut self, remote_ref: &str) -> Result<()>;
    fn list_open(&mut self) -> Result<Vec<RemoteIssue>>;
    fn done_via_status(&self) -> bool;
}
Expand description

Common surface both tracker adapters implement so the orchestration is tool-agnostic.

status is the remote state/label already computed by the pure mapping helpers (e.g. closed, Done, or the first work column). GitLab conveys “done” via a separate close call (TrackerAdapter::mark_done); Linear sends --status Done directly (TrackerAdapter::done_via_status).

Required Methods§

Source

fn tool(&self) -> Tool

Source

fn create_issue( &mut self, title: &str, body: &str, labels: &[String], assignee: Option<&str>, priority: Option<&str>, status: &str, ) -> Result<String>

Create a remote issue and return its remote id (GitLab iid, Linear identifier).

Source

fn update_issue( &mut self, remote_ref: &str, title: &str, body: &str, labels: &[String], assignee: Option<&str>, priority: Option<&str>, status: &str, ) -> Result<()>

Update an existing remote issue in place.

Source

fn mark_done(&mut self, remote_ref: &str) -> Result<()>

Convey “done” (GitLab: issue close <id>). Only invoked when done_via_status is false.

Source

fn list_open(&mut self) -> Result<Vec<RemoteIssue>>

List open remote issues (the import source). Closed/done issues are excluded.

Source

fn done_via_status(&self) -> bool

Linear sets done through the status flag; GitLab needs a separate close call.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§