pub struct GitHubAdapter { /* private fields */ }Expand description
GitHub Issues sync adapter.
Connects SSOT tasks to GitHub Issues in a specific repository.
Implementations§
Source§impl GitHubAdapter
impl GitHubAdapter
Sourcepub fn new(token: &str, owner: &str, repo: &str) -> Self
pub fn new(token: &str, owner: &str, repo: &str) -> Self
Create a new GitHub adapter for a specific repository.
Sourcepub async fn create_issue(
&self,
title: &str,
body: Option<&str>,
labels: &[String],
) -> Result<GitHubIssue, SdkError>
pub async fn create_issue( &self, title: &str, body: Option<&str>, labels: &[String], ) -> Result<GitHubIssue, SdkError>
Create an issue in GitHub.
Sourcepub async fn update_issue(
&self,
number: u64,
update: GitHubIssueUpdate,
) -> Result<GitHubIssue, SdkError>
pub async fn update_issue( &self, number: u64, update: GitHubIssueUpdate, ) -> Result<GitHubIssue, SdkError>
Update an existing issue.
Sourcepub async fn list_issues(
&self,
state: &str,
) -> Result<Vec<GitHubIssue>, SdkError>
pub async fn list_issues( &self, state: &str, ) -> Result<Vec<GitHubIssue>, SdkError>
List issues from the repository.
Trait Implementations§
Source§impl SyncAdapter for GitHubAdapter
impl SyncAdapter for GitHubAdapter
Source§fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
events: &'life1 [SsotEvent],
) -> Pin<Box<dyn Future<Output = Result<Vec<SyncResult>, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
events: &'life1 [SsotEvent],
) -> Pin<Box<dyn Future<Output = Result<Vec<SyncResult>, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Push SSOT changes to the external system. Read more
Source§fn pull<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalEvent>, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pull<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalEvent>, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pull changes from the external system into SSOT format. Read more
Source§fn resolve_conflict<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_local: &'life1 SyncRecord,
_remote: &'life2 SyncRecord,
) -> Pin<Box<dyn Future<Output = Result<Resolution, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_conflict<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_local: &'life1 SyncRecord,
_remote: &'life2 SyncRecord,
) -> Pin<Box<dyn Future<Output = Result<Resolution, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve a conflict between local and remote state.
Auto Trait Implementations§
impl Freeze for GitHubAdapter
impl !RefUnwindSafe for GitHubAdapter
impl Send for GitHubAdapter
impl Sync for GitHubAdapter
impl Unpin for GitHubAdapter
impl UnsafeUnpin for GitHubAdapter
impl !UnwindSafe for GitHubAdapter
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
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>
Converts
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>
Converts
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