2024-09-18 11:55:33 +01:00
|
|
|
//
|
2024-09-19 19:12:41 +01:00
|
|
|
use anyhow::Result;
|
|
|
|
use init::init_config;
|
|
|
|
use scanner::find_markers;
|
2024-09-18 11:55:33 +01:00
|
|
|
|
2024-09-19 19:12:41 +01:00
|
|
|
mod init;
|
2024-09-18 11:55:33 +01:00
|
|
|
mod model;
|
2024-09-18 15:28:17 +01:00
|
|
|
mod patterns;
|
2024-09-19 19:12:41 +01:00
|
|
|
mod scanner;
|
2024-09-17 19:42:05 +01:00
|
|
|
|
2024-09-19 19:32:15 +01:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
|
|
|
|
2024-09-18 07:44:34 +01:00
|
|
|
fn main() -> Result<()> {
|
2024-09-17 16:48:09 +01:00
|
|
|
println!("Forgejo TODO Checker!");
|
|
|
|
|
2024-09-19 19:12:41 +01:00
|
|
|
let config = init_config()?;
|
2024-09-18 07:44:34 +01:00
|
|
|
|
2024-09-19 19:12:41 +01:00
|
|
|
let markers = find_markers(config)?;
|
|
|
|
println!("{markers}");
|
2024-09-17 18:03:50 +01:00
|
|
|
|
2024-09-17 19:42:05 +01:00
|
|
|
// TODO: add authentication when provided
|
|
|
|
// let issues = ureq::get(&api).call()?.into_string()?;
|
|
|
|
// TODO: parse issues to get list of open issue numbers
|
|
|
|
|
|
|
|
// TODO: loop over list of expected issues and drop any where they do exist and are open
|
|
|
|
// TODO: if remaining list is not empty - add all to error list
|
|
|
|
//
|
|
|
|
// TODO: if error list is empty - exit okay
|
|
|
|
// TODO: if error list is not empty - log erros and exit not okay
|
2024-09-17 16:48:09 +01:00
|
|
|
|
|
|
|
Ok(())
|
2024-09-17 16:26:32 +01:00
|
|
|
}
|