feat(sync): fetch and store GitLab issue links (bd-343o)

Add end-to-end support for GitLab issue link fetching:
- New GitLabIssueLink type + fetch_issue_links API client method
- Migration 029: add issue_links job type and watermark column
- issue_links.rs: bidirectional entity_reference storage with
  self-link skip, cross-project fallback, idempotent upsert
- Drain pipeline in orchestrator following mr_closes_issues pattern
- Display related issues in 'lore show issues' output
- --no-issue-links CLI flag with config, autocorrect, robot-docs
- 6 unit tests for storage logic
This commit is contained in:
teernisse
2026-02-19 09:26:28 -05:00
parent 9a1dbda522
commit 1e679a6d72
18 changed files with 2051 additions and 8 deletions

View File

@@ -627,6 +627,15 @@ impl GitLabClient {
self.fetch_all_pages(&path).await
}
pub async fn fetch_issue_links(
&self,
gitlab_project_id: i64,
issue_iid: i64,
) -> Result<Vec<crate::gitlab::types::GitLabIssueLink>> {
let path = format!("/api/v4/projects/{gitlab_project_id}/issues/{issue_iid}/links");
coalesce_not_found(self.fetch_all_pages(&path).await)
}
pub async fn fetch_mr_diffs(
&self,
gitlab_project_id: i64,