Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored and boxbeam committed May 15, 2024
1 parent 57bc0af commit b2fd492
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 175 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ee/tabby-db/schema/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ CREATE TABLE integration_access_tokens(
CREATE TABLE provided_repositories(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
integration_access_token_id INTEGER NOT NULL,
kind TEXT NOT NULL,
vendor_id TEXT NOT NULL,
name TEXT NOT NULL,
git_url TEXT NOT NULL,
Expand Down
326 changes: 165 additions & 161 deletions ee/tabby-db/schema/schema.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions ee/tabby-schema/src/schema/repository/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ mod gitlab;
use std::{path::PathBuf, sync::Arc};

mod third_party;
pub use third_party::{ProvidedRepository, ThirdPartyRepositoryService};

use async_trait::async_trait;
pub use gitlab::{GitlabProvidedRepository, GitlabRepositoryProvider, GitlabRepositoryService};
use juniper::{GraphQLEnum, GraphQLObject, ID};
use serde::Deserialize;
use tabby_common::config::{RepositoryAccess, RepositoryConfig};
pub use third_party::{ProvidedRepository, ThirdPartyRepositoryService};

use super::Result;

Expand Down
3 changes: 2 additions & 1 deletion ee/tabby-schema/src/schema/repository/third_party.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use crate::{integration::IntegrationKind, schema::Result};
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use juniper::ID;

use crate::{integration::IntegrationKind, schema::Result};

pub struct ProvidedRepository {
pub integration_id: ID,
pub active: bool,
Expand Down
1 change: 0 additions & 1 deletion ee/tabby-webserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ gitlab = "0.1610.0"
apalis = { git = "https://github.com/wsxiaoys/apalis", rev = "91526e8", features = ["sqlite", "cron" ] }
uuid.workspace = true
hyper-util = { version = "0.1.3", features = ["client-legacy"] }
strum.workspace = true

[dev-dependencies]
assert_matches = "1.5.0"
Expand Down
17 changes: 8 additions & 9 deletions ee/tabby-webserver/src/service/repository/third_party.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
use std::sync::Arc;

use async_trait::async_trait;
use chrono::{DateTime, Utc};
use fetch::fetch_all_repos;
use juniper::ID;
use std::sync::Arc;
use tabby_db::DbConn;
use tabby_schema::{
integration::{IntegrationKind, IntegrationService},
repository::ProvidedRepository,
repository::{ProvidedRepository, ThirdPartyRepositoryService},
AsRowid, DbEnum, Result,
};
use tracing::{debug, error};
use url::Url;

use async_trait::async_trait;
use tabby_db::DbConn;
use tabby_schema::repository::ThirdPartyRepositoryService;

use crate::service::graphql_pagination_to_filter;
use fetch::fetch_all_repos;

mod fetch;

Expand Down Expand Up @@ -95,7 +94,7 @@ impl ThirdPartyRepositoryService for ThirdPartyRepositoryServiceImpl {
Ok(urls)
}

Check warning on line 95 in ee/tabby-webserver/src/service/repository/third_party.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/repository/third_party.rs#L63-L95

Added lines #L63 - L95 were not covered by tests

async fn sync_repositories(&self, kind: IntegrationKind) -> Result<()> {
async fn sync_repositories(&self, _kind: IntegrationKind) -> Result<()> {
todo!("Loop over integrations and call refresh_repositories_for_provider");
Ok(())
}

Check warning on line 100 in ee/tabby-webserver/src/service/repository/third_party.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/repository/third_party.rs#L97-L100

Added lines #L97 - L100 were not covered by tests
Expand Down Expand Up @@ -173,7 +172,7 @@ async fn refresh_repositories_for_provider(
.update_integration_error(provider_id.clone(), None)
.await?;
let num_removed = repository
.delete_outdated_repositories(provider_id, start.into())
.delete_outdated_repositories(provider_id, start)
.await?;
debug!("Removed {} outdated repositories", num_removed);
Ok(())
Expand Down

0 comments on commit b2fd492

Please sign in to comment.