fork-dev / TrackerWin

Bug and issue tracker for Fork for Windows
450 stars 10 forks source link

Issue tracker 2nd overlapping rule doesn't get processed #2226

Open GruffJames opened 1 month ago

GruffJames commented 1 month ago

Hi, I'm having an issue with the issue tracker rules. If I have 2 rules that overlap the second one doesn't get processed.

Input string: PR - !12345 PR - !56789

PR - !12345-My_First-Repo PR - !56789-My_Second-Repo

Rule 1: Regex - !(\d+)-(\S+) Result URL - https://github.com/$2/$1

Rule 2: Regex - !(\d+) Result URL - https://github.com/My_First-Repo/$1

When I run both rules, only lines 3&4 are OK: image When I run just rule 2. only lines 1&2 are OK: image

Is there anything I can do to fix this on my end or is this a system issue?

Thanks, Gruff

DanPristupov commented 1 month ago

https://github.com/fork-dev/TrackerWin/issues/1451

DanPristupov commented 1 month ago

We'll fix this soon

GruffJames commented 1 month ago

Great cheers

DanPristupov commented 1 month ago

Wait. I'm sorry, I think I was wrong. https://github.com/fork-dev/TrackerWin/issues/1451 is about multiple rules, not about overlapping.

Overlapping intervals can't be handled. A single interval can't match multiple rules at the same time.

GruffJames commented 1 month ago

Hi,

My thinking in my example was that if rule 2 is not applied then rule 1 can be ran and then be applied.

So if you rearranged the order of rules, then only rule 1 would be applied. I think if this could be implemented with #1706 then it would be really useful.

My use case is I want to link to a PR from a different repo, I could then append the other repo name to the PR Id. how it looks currently image