Implement extract_pull_request for GitLab provider#47973
Implement extract_pull_request for GitLab provider#47973cole-miller merged 2 commits intozed-industries:mainfrom
extract_pull_request for GitLab provider#47973Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Yuxuan Che.
|
Fixes zed-industries#38709 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. The implementation parses GitLab MR references from commit messages: - Squash merge pattern: message (!123) - Standard merge commit: See merge request group/project!123 Added comprehensive tests covering: - Squash commit pattern - Merge commit pattern - Self-hosted GitLab instances - Non-matching messages
6fce59b to
f2623cb
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @littleKitchen on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @littleKitchen on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
extract_pull_request for GitLab provider
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Yuxuan Che.
|
4a24da8 to
6ba516d
Compare
|
Thanks! |
Fixes #38709
Summary
This implements the
extract_pull_requestmethod for GitLab'sGitHostingProvidertrait, 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:
message (!123)- When GitLab squash-merges, it appends the MR number in parenthesesSee merge request group/project!123- The default merge commit messageTests Added
test_extract_merge_request_from_squash_commit- Validates the(!123)patterntest_extract_merge_request_from_merge_commit- Validates theSee merge requestpatterntest_extract_merge_request_self_hosted- Ensures it works with self-hosted GitLab instancestest_extract_merge_request_no_match- Confirms None is returned for non-matching messagesRelated
This follows the same pattern as the GitHub provider implementation.
Release Notes