Skip to content

Commit f9712a5

Browse files
jflymightyiam
andcommitted
refactor: remove api-config and fetcher-config crates
Co-authored-by: Shahar "Dawn" Or <mightyiampresence@gmail.com>
1 parent 5939a01 commit f9712a5

File tree

12 files changed

+15
-74
lines changed

12 files changed

+15
-74
lines changed

Cargo.lock

Lines changed: 1 addition & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/api-config/Cargo.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

crates/api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
camino = "*"
33
poem = {features = ["requestid", "test"], version = "*"}
44
poem-openapi = {features = ["swagger-ui"], version = "*"}
5-
pr-tracker-api-config = {path = "../api-config"}
65
sqlx = {default-features = false, features = ["macros", "migrate"], version = "*"}
76
tokio = "*"
87
anyhow.workspace = true
98
confique.workspace = true
109
pr-tracker-store.workspace = true
1110
serde.workspace = true
11+
serde_with.workspace = true
1212
thiserror.workspace = true
1313
tracing-subscriber.workspace = true
1414
util.workspace = true
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
#![allow(non_snake_case, clippy::struct_field_names)]
22

3-
pub use environment::Environment;
43
use serde::Deserialize;
54
use serde_with::DisplayFromStr;
65
use serde_with::serde_as;
76
use tracing_subscriber::EnvFilter;
87

9-
mod environment {
10-
include!(env!("api_config_snippet"));
11-
}
8+
include!(env!("api_config_snippet"));
129

1310
#[serde_as]
1411
#[derive(Deserialize, Debug)]

crates/api/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#![warn(clippy::pedantic)]
22

3+
mod config;
4+
35
use anyhow::Context;
6+
use config::Environment;
47
use confique::Config;
58
use poem::{
69
Server,
710
listener::{Listener, TcpListener},
811
};
912
use pr_tracker_api::endpoint;
10-
use pr_tracker_api_config::Environment;
1113

1214
#[tokio::main]
1315
async fn main() {

crates/fetcher-config/Cargo.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

crates/fetcher-config/src/lib.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

crates/fetcher/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ env_logger = "*"
44
graphql_client = {default-features = false, features = ["graphql_query_derive", "reqwest-rustls"], version = "*"}
55
itertools = "*"
66
log = "*"
7-
pr-tracker-fetcher-config = {path = "../fetcher-config"}
87
# Pinned for compatibility with graphql-client.
98
# We can unpin once this is released: <https://github.com/graphql-rust/graphql-client/commit/683951f335b22317ab18dd170809ad57838ffe9d>
109
reqwest = {default-features = false, features = ["rustls-tls"], version = "^0.11"}

crates/fetcher/src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![allow(non_snake_case, clippy::struct_field_names)]
2+
3+
include!(env!("fetcher_config_snippet"));

crates/fetcher/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#![warn(clippy::pedantic)]
22

3+
mod config;
4+
35
use anyhow::{Context, ensure};
6+
use config::Environment;
47
use confique::Config;
58
use pr_tracker_fetcher::{github::GitHubGraphqlClient, run};
6-
use pr_tracker_fetcher_config::Environment;
79
use pr_tracker_store::PgConnection;
810
use sqlx_core::connection::Connection;
911
use wildmatch::WildMatch;

0 commit comments

Comments
 (0)