1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Azure DevOps pull-request fetcher (Issue #84).
//!
//! Strategy: scan commit messages for the standard ADO merge-commit format
//! (`Merged PR NNNN:`), extract unique PR IDs, then fetch each PR's metadata
//! and reviewer list via the project-scoped ADO REST endpoint
//! `GET {org}/{project}/_apis/git/pullrequests/{id}`. This endpoint does not
//! require the repository GUID, which keeps configuration minimal.
//!
//! # `merge_commit_sha` emission matrix (issue #96)
//!
//! | `status` | `mergeStrategy` | emitted `merge_commit_sha` | rationale |
//! |--------------|----------------------------|-----------------------------------|----|
//! | `completed` | `noFastForward` or absent | `Some(lastMergeCommit.commitId)` | true merge |
//! | `completed` | `squash` | `None` | squash rewrites history |
//! | `completed` | `rebase` | `None` | rebase replays commits |
//! | `completed` | `rebaseMerge` | `None` | rebase-merge not reliable |
//! | any non-`completed` | * | `None` | preview merge never landed |
//!
//! Why a separate file: the existing `azdo/client.rs` is already large and
//! covers work-item / WIQL flows. PR fetching is an independent surface area
//! (different DB tables, different commit-message regex) and is easier to test
//! in isolation.
pub
pub
pub
// Re-export the public surface so callers use `azdo::pr_fetcher::*`.
pub use ;
pub use AdoPrFetcher;
pub use ;
// Bring imports into scope for the test module.
use crateAzdoError;
use crateAzureDevOpsConfig;
use PrRaw;