Improves branch name autolink matching logic#4238
Merged
Conversation
5dede38 to
3fc84c1
Compare
7 tasks
3fc84c1 to
1ebec4a
Compare
7 tasks
Refactors the branch name autolink matching logic to improve accuracy and reduce false positives. - Introduces multiple regexes for branch name matching based on prefix and issue number patterns. - Updates test - Filters remote autolinks for branch names to only include non-dynamic autolinks of type 'branch'. - Fixes issue where integration autolinks were incorrectly collected for branch autolinking. - Sorts refsets so that issue integrations are checked first for matches. - Limits branch autolink matches to 1 maximum per branch name.
1ebec4a to
0bb9f0b
Compare
saeedzaha
pushed a commit
to saeedzaha/vscode-gitlens
that referenced
this pull request
Apr 28, 2025
…itkraken#4238) Refactors the branch name autolink matching logic to improve accuracy and reduce false positives. - Introduces multiple regexes for branch name matching based on prefix and issue number patterns. - Updates test - Filters remote autolinks for branch names to only include non-dynamic autolinks of type 'branch'. - Fixes issue where integration autolinks were incorrectly collected for branch autolinking. - Sorts refsets so that issue integrations are checked first for matches. - Limits branch autolink matches to 1 maximum per branch name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors the branch name autolink matching logic to improve accuracy and reduce false positives.
(/|-|_|.)or end-of-string and take the first match encountered..(feature|feat|fix|bug|bugfix|hotfix|issue|ticket)(/|-|_|#|/#|-#|_#)<num>followed by a connector(/|-|_|.)or end-of-string and take the first match./), non-numeric characters. Note: this is to rule out numbers that are full sections like<num>/...,.../<num>/..., or.../<num>and to rule out date-formats like<num.<num2>or<num>-<num2>.GLVSC_123as valid prefix matches for branch names onlyCloses #3894