Skip to content

Commit 07382d2

Browse files
committed
tests: improve coverage
1 parent 87423a4 commit 07382d2

File tree

7 files changed

+1482
-95
lines changed

7 files changed

+1482
-95
lines changed

Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ name = "repos"
33
version = "0.0.8"
44
edition = "2024"
55

6+
[lib]
7+
name = "repos"
8+
path = "src/lib.rs"
9+
10+
[workspace]
11+
members = [
12+
".",
13+
"plugins/repos-health",
14+
]
15+
616
[dependencies]
717
async-trait = "0.1"
818
clap = { version = "4.4", features = ["derive"] }
@@ -22,3 +32,4 @@ uuid = { version = "1.6", features = ["v4"] }
2232

2333
[dev-dependencies]
2434
tempfile = "3.0"
35+
serial_test = "3.0"

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ pub type Result<T> = anyhow::Result<T>;
1515
pub use commands::{Command, CommandContext};
1616
pub use config::{Config, Repository};
1717
pub use github::PrOptions;
18+
19+
/// Helper function for plugins to load the default config
20+
pub fn load_default_config() -> anyhow::Result<Config> {
21+
Config::load_config(constants::config::DEFAULT_CONFIG_FILE)
22+
}

0 commit comments

Comments
 (0)