Repository navigation
馃帀 Notion to GitHub Comments v1.2.1
A GitHub Action that extracts Notion page and database URLs from Pull Request descriptions and posts their content as formatted, AI-ready comments.
馃搵 What's New
Summary
This PR improves the Notion URL extraction logic to prevent false positives from non-Notion services.
Changes
馃悰 Bug Fixes
- Exclude non-Notion domain URLs: Fixed extraction of URLs from other services (GitHub, Google Drive, AWS S3, etc.) that contain Notion-like ID patterns
- Strict domain validation: Restricted extraction to only URLs containing notion.so or notion.site
- Improved HTML entity handling: Properly remove HTML entities (", >, etc.) attached to URL endings
馃摑 Documentation Improvements
- Added comprehensive JSDoc comments to url-extractor.ts
- Clarified the purpose and examples for each regex pattern
- Documented processing steps and supported formats
馃И Test Enhancements
- Added exclusion tests for other service URL patterns (GitHub, GitLab, Slack, Jira, etc.)
- Added test cases to verify custom domain URLs are not extracted
Technical Details
- Removed generic NOTION_ID_REGEX pattern matching
- URL filtering now relies solely on isNotionDomain check
- This prevents false positives from other services using UUIDs or 32-character hex strings in their URLs
Impact
- Improved URL extraction accuracy prevents unnecessary processing of external service URLs in PR comments
- No impact on existing Notion URL extraction functionality
馃殌 How to Use This Version
- uses: wasabeef/notion-to-github-comments@v1.2.1
with:
notion-token: ${{ secrets.NOTION_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}Full Changelog: v1.2.0...v1.2.1