Skip to content

feat: PR/Commit Links in Investigation Output (fn-38)#106

Merged
bordumb merged 1 commit intomainfrom
feat/fn-38-pr-commit-links
Jan 31, 2026
Merged

feat: PR/Commit Links in Investigation Output (fn-38)#106
bordumb merged 1 commit intomainfrom
feat/fn-38-pr-commit-links

Conversation

@bordumb
Copy link
Owner

@bordumb bordumb commented Jan 31, 2026

Summary

  • Add deep links to PRs and commits in investigation output across CLI, notebook, and markdown export formats
  • Leverage bond-agent tools for PR metadata enrichment instead of building custom API clients
  • Support GitHub, GitLab, and Bitbucket with custom base URLs for self-hosted instances

Changes

Database

  • Add migration 034 extending code_changes with PR metadata columns (pr_number, pr_url, pr_title, pr_author, pr_merged_at, provider)
  • Update SQLAlchemy model and domain types with PR fields

PR Enrichment (fn-38.2)

  • Create PREnrichmentService using bond-agent's githunter/github tools
  • Uses githunter.find_pr_discussion for local git lookup (no API calls)
  • Falls back to github.get_pr for full PR details when token available

URL Templates (fn-38.3)

  • Create URL templates for GitHub, GitLab, and Bitbucket
  • Support custom base URLs for self-hosted instances
  • build_best_link() prefers PR when available

Output Formatting (fn-38.4)

  • CLI: Terminal hyperlinks (OSC 8) with plain text fallback
  • Notebook: HTML rendering with PR badges
  • Markdown: "Related Code Changes" section with markdown links

Test Plan

  • 44 new unit tests covering all components
  • URL templates tested for all 3 providers
  • PR enrichment tested with mocked bond-agent adapters
  • CLI display tested for terminal hyperlinks and fallback
  • All pre-commit hooks pass
  • mypy passes

🤖 Generated with Claude Code

Add deep links to PRs and commits in investigation output across CLI,
notebook, and markdown export formats. Leverages bond-agent tools for
PR metadata enrichment instead of building custom API clients.

Changes:
- Add migration 034 extending code_changes with PR metadata columns
- Create PREnrichmentService using bond-agent's githunter/github tools
- Add URL templates for GitHub/GitLab/Bitbucket with custom base URL support
- Add CodeChangeLink domain type for structured output
- Add terminal hyperlink support with OSC 8 and plain text fallback
- Add "Related Code Changes" section to markdown export
- Add HTML rendering for notebook output with PR badges
- Add comprehensive tests (44 new tests)

Closes: fn-38

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dataing Ready Ready Preview, Comment Jan 31, 2026 4:18pm
dataing-app Ready Ready Preview, Comment Jan 31, 2026 4:18pm
dataing-docs Ready Ready Preview, Comment Jan 31, 2026 4:18pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant