2121use anyhow:: { Context , Result , bail} ;
2222use askama:: Template ;
2323use chrono:: { DateTime , Duration , Utc } ;
24- use render:: types:: ParsedEntry ;
2524use serde:: Deserialize ;
2625use std:: collections:: HashMap ;
2726use std:: env;
2827use std:: path:: { Path , PathBuf } ;
2928
29+ /// A minimal tool entry parsed from `data/tools/<name>.yml`.
30+ /// Only the fields needed for the contributing criteria check are required.
31+ #[ derive( Debug , Deserialize ) ]
32+ struct ToolEntry {
33+ name : String ,
34+ source : Option < String > ,
35+ }
36+
3037/// Response from `GET /repos/{owner}/{repo}`.
3138#[ derive( Debug , Deserialize ) ]
3239struct RepoInfo {
@@ -282,7 +289,7 @@ fn parse_github_repo(url: &str) -> Option<(String, String)> {
282289/// # Errors
283290///
284291/// Returns an error if the file cannot be read or parsed.
285- fn read_tool ( path : & Path ) -> Result < ParsedEntry > {
292+ fn read_tool ( path : & Path ) -> Result < ToolEntry > {
286293 let f = std:: fs:: File :: open ( path) . with_context ( || format ! ( "Cannot open {}" , path. display( ) ) ) ?;
287294 serde_yaml:: from_reader ( f) . with_context ( || format ! ( "Cannot parse {}" , path. display( ) ) )
288295}
@@ -293,7 +300,7 @@ fn read_tool(path: &Path) -> Result<ParsedEntry> {
293300///
294301/// Returns an error only for unexpected failures (network, auth). Missing
295302/// criteria produce `CheckResult::Fail` values, not errors.
296- async fn check_tool ( client : & GithubClient , tool : & ParsedEntry ) -> Result < ToolReport > {
303+ async fn check_tool ( client : & GithubClient , tool : & ToolEntry ) -> Result < ToolReport > {
297304 let source = tool. source . clone ( ) ;
298305
299306 let gh_coords = source. as_deref ( ) . and_then ( parse_github_repo) ;
0 commit comments