Skip to content

Conversation

jezdez
Copy link
Member

@jezdez jezdez commented Sep 30, 2025

🔗 GitHub Links Extension

Add new Sphinx extension that automatically converts GitHub issue/PR references into clickable links in changelog files.

Features

  • Automatic Detection: Converts (#123) and (owner/repo#456) patterns to clickable links
  • Smart Targeting: Only processes changelog files (changelog, release, history, news)
  • Configurable: Custom URL templates, repos, new tab behavior
  • Validation: Comprehensive configuration validation with helpful error messages

Usage

extensions = ['conda_sphinx_theme.github_links']
github_links_repo = 'owner/repo'  # Required

Testing (45+ tests included)

  • Pattern matching and URL generation tests
  • Configuration validation tests
  • Changelog file detection logic
  • Integration tests with mocked Sphinx components
  • New tab behavior and custom URL templates

Dependencies

Thread-safe with parallel_read_safe and parallel_write_safe support.

- Automatically converts GitHub issue references to clickable links in changelog files
- Supports patterns like (#123) and (owner/repo#456)
- Configurable URL templates, target repos, and link behavior
- Only processes changelog files (changelog, release, history, news)
- Includes comprehensive configuration validation
- Thread-safe with parallel_read_safe and parallel_write_safe support
- 45+ test cases covering pattern matching, URL generation, and Sphinx integration
- Tests for valid/invalid GitHub reference patterns (#123, owner/repo#456)
- Configuration validation tests for repository formats
- Changelog file detection and link creation logic
- Integration tests with mocked Sphinx components
- Covers new tab behavior, custom URL templates, and error handling

Tests belong with the extension implementation in this PR.
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