-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improves branch autolinks experiments #3898
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow the logic of the added code (specifically, the priority calculation) - some comments throughout might help. @eamodio might have more insight into it.
It didn't seem to help with this case I encountered in my repo. Not a blocker for merge but would be nice if it can accommodate cases like this (the first issue is correct, the second is not):
src/autolinks/autolinks.utils.ts
Outdated
console.log( | ||
JSON.stringify(match.value), | ||
match.value.groups.numberChunk, | ||
match.value.groups.numberChunkBeginning, | ||
match.value.input, | ||
match.value.groups.issueKeyNumber, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This console log should be removed. Likely left over from when you were testing it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
a342b94
to
6daf177
Compare
625e1ab
to
8e05baa
Compare
Description
Added chunk matching logic for non-prefixed numbers:
considered the distance from the edges of the chunk as a priority sign
the chunk that is more close to the end is more likely actual issue number
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses