Implement `extract_pull_request` for GitLab provider (#47973)
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
f7fe6181cdlittleKitchen committed on 1/31/2026, 9:56:34 PM· committed by GitHubparent839b4f1