This repository was archived by the owner on Sep 20, 2024. It is now read-only.
refactor: enhance github url regex #88
Merged
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.
Description
Enhances the GitHub URL regex to only match issue URLs rather than any GitHub URL with digits in the path, to support multiple subdomains for some companies, to not limit supported domain and owner and repo names to basic A-Z character set but to support other ASCII or Unicode characters, etc. - all while retaining the fix from #86, mostly by using a
[^\s]pattern to avoid matching whitespace.Motivation and Context
There were some false positives and some cases where existing regex wouldn't quite work.
How Has This Been Tested?
Existing unit tests pass. Added some more unit tests that fail without the changes but pass with.
Without changes:

With changes:

Screenshots (if appropriate):
Types of changes
Checklist: