Skip to content
This repository was archived by the owner on May 19, 2026. It is now read-only.

Commit 71c1ff2

Browse files
bobmatnycclaude
andcommitted
fix(collect): ADO PR fetcher supports multiple projects (closes #91)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a468b07 commit 71c1ff2

7 files changed

Lines changed: 792 additions & 62 deletions

File tree

.secrets.baseline

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
{
9191
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
9292
},
93+
{
94+
"path": "detect_secrets.filters.common.is_baseline_file",
95+
"filename": ".secrets.baseline"
96+
},
9397
{
9498
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9599
"min_level": 2
@@ -122,6 +126,23 @@
122126
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123127
}
124128
],
125-
"results": {},
126-
"generated_at": "2026-05-11T14:31:45Z"
129+
"results": {
130+
"src/collect/azdo/pr_fetcher.rs": [
131+
{
132+
"type": "Hex High Entropy String",
133+
"filename": "src/collect/azdo/pr_fetcher.rs",
134+
"hashed_secret": "71c939e2c6cae2cef6d2c37282228f24cb5c1bb5",
135+
"is_verified": false,
136+
"line_number": 971
137+
},
138+
{
139+
"type": "Hex High Entropy String",
140+
"filename": "src/collect/azdo/pr_fetcher.rs",
141+
"hashed_secret": "f5b2c8c6c50a224ef1830a900426d02e86a30c8a",
142+
"is_verified": false,
143+
"line_number": 1034
144+
}
145+
]
146+
},
147+
"generated_at": "2026-05-18T20:37:51Z"
127148
}

src/collect/azdo/client.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)