mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 06:24:56 +00:00
Fixes #38709 ## Summary This implements the `extract_pull_request` method for GitLab's `GitHostingProvider` trait, enabling merge request links to be shown in the git blame hover popover. ## Implementation The implementation parses GitLab MR references from commit messages using a regex that matches two common patterns: 1. **Squash merge pattern**: `message (!123)` - When GitLab squash-merges, it appends the MR number in parentheses 2. **Standard merge commit**: `See merge request group/project!123` - The default merge commit message ## Tests Added - `test_extract_merge_request_from_squash_commit` - Validates the `(!123)` pattern - `test_extract_merge_request_from_merge_commit` - Validates the `See merge request` pattern - `test_extract_merge_request_self_hosted` - Ensures it works with self-hosted GitLab instances - `test_extract_merge_request_no_match` - Confirms None is returned for non-matching messages ## Related This follows the same pattern as the GitHub provider implementation. ## Release Notes - Added support for GitLab merge request links in git blame hover popover |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||