@@ -76,6 +76,15 @@ pub enum AzdoError {
7676 /// Response body could not be parsed as the expected JSON shape.
7777 #[ error( "response parse error: {0}" ) ]
7878 Parse ( String ) ,
79+
80+ /// Azure DevOps configuration failed validation at fetcher
81+ /// construction time: both `project` and `projects` are empty/blank.
82+ ///
83+ /// Returning this from `AdoPrFetcher::new` is the load-bearing check
84+ /// that prevents a misconfigured fetcher from silently returning
85+ /// `Ok(None)` for every PR (issue #91 regression guard).
86+ #[ error( "invalid Azure DevOps configuration: {0}" ) ]
87+ Config ( String ) ,
7988}
8089
8190// ---------------------------------------------------------------------------
@@ -1537,7 +1546,8 @@ mod tests {
15371546 AzureDevOpsConfig {
15381547 organization_url : server_url. to_string ( ) ,
15391548 pat : "secret-pat" . into ( ) ,
1540- project : "MyProject" . into ( ) ,
1549+ project : Some ( "MyProject" . into ( ) ) ,
1550+ projects : vec ! [ ] ,
15411551 ticket_regex : r"AB#(\d+)" . into ( ) ,
15421552 team_keys : vec ! [ ] ,
15431553 fetch_on_reference : true ,
@@ -1549,7 +1559,8 @@ mod tests {
15491559 AzureDevOpsConfig {
15501560 organization_url : "https://dev.azure.com/myorg" . into ( ) ,
15511561 pat : "secret-pat" . into ( ) ,
1552- project : "MyProject" . into ( ) ,
1562+ project : Some ( "MyProject" . into ( ) ) ,
1563+ projects : vec ! [ ] ,
15531564 ticket_regex : r"AB#(\d+)" . into ( ) ,
15541565 team_keys : vec ! [ ] ,
15551566 fetch_on_reference : true ,
0 commit comments