Skip to content

Improve issue matching with branch names #3894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
justinrobots opened this issue Dec 19, 2024 · 3 comments · Fixed by #4238
Closed

Improve issue matching with branch names #3894

justinrobots opened this issue Dec 19, 2024 · 3 comments · Fixed by #4238
Assignees
Labels
area-autolinks Issues or features related to autolinks needs-verification Request for verification pending-release Resolved but not yet released to the stable edition
Milestone

Comments

@justinrobots
Copy link
Collaborator

The branch for this issue is release-notes-16-1 and GitLens thinks these two issues (#16 and #1) are associated but they are not. I suspect the matching algorithm needs to be refined to avoid mismatches like this.

Image

@justinrobots justinrobots added this to the 16.1-patch milestone Dec 19, 2024
@justinrobots justinrobots modified the milestones: 16.1-patch, 16.2 Dec 19, 2024
@nzaytsev nzaytsev linked a pull request Dec 20, 2024 that will close this issue
7 tasks
@nzaytsev
Copy link
Contributor

I've made some improvements with the non-prefixed autolinks.

  • Now I'm trying to consider issue title and its' matched numbers to remove them from the final list of the autolinks
  • I'm searching for number chunks no longer than 2 numbers
  • I'm trying to ignore the branch name chunks describing the release version as much as it's possible

You can see how it works in the new test group

I actually don't like the way it's done, it's a bit anti-pattern, but now it works slightly more precisely with non-prefixed keys. I'm not sure if it won't make the detection slower. And it still can not work with 100% precise. I described at least a few cases (in the test file) which we can not definitely associate with an issue

In my opinion, we should have a button to de-associate the mismatched issues with the branch. No matter how hard we try to "tune" the autolinks algorithm, the patterns of branch name writing vary greatly from team to team and from user to user.

As @sergeibbb suggests, we could add an additional setting for the autolinks that would disable the basic algorithm and allow the user to use their own pattern

@justinrobots justinrobots modified the milestones: 16.2, 16.3 Jan 20, 2025
@justinrobots
Copy link
Collaborator Author

In my opinion, we should have a button to de-associate the mismatched issues with the branch. No matter how hard we try to "tune" the autolinks algorithm, the patterns of branch name writing vary greatly from team to team and from user to user.

I agree that we should find a good way to allow users to disassociate issues that are inaccurately matched.

@nzaytsev
Copy link
Contributor

@justinrobots - I tried to do that in scope of the new task #3956

@eamodio eamodio added the area-autolinks Issues or features related to autolinks label Jan 22, 2025
@d13 d13 modified the milestones: 16.3, Shortlist, 16.4 Feb 11, 2025
@eamodio eamodio modified the milestones: 17.0, 17.1 Apr 5, 2025
@axosoft-ramint axosoft-ramint self-assigned this Apr 10, 2025
axosoft-ramint added a commit that referenced this issue Apr 16, 2025
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.
axosoft-ramint added a commit that referenced this issue Apr 21, 2025
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.
axosoft-ramint added a commit that referenced this issue Apr 23, 2025
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.
axosoft-ramint added a commit that referenced this issue Apr 24, 2025
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.
@github-actions github-actions bot added needs-verification Request for verification pending-release Resolved but not yet released to the stable edition labels Apr 24, 2025
saeedzaha pushed a commit to saeedzaha/vscode-gitlens that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-autolinks Issues or features related to autolinks needs-verification Request for verification pending-release Resolved but not yet released to the stable edition
Projects
None yet
5 participants