mstrap / bugtraq

Specification for linking Git with issue trackers
43 stars 15 forks source link

Multiple configuration for github #33

Closed Grety closed 4 weeks ago

Grety commented 1 month ago

Hello! I've desperately tried segregating links to different GitHub projects on the same repo. I can get only one of them to work.

[bugtraq "pulls"]
url = "https://github.com/repo/app/pull/%BUGID%"
logfilterregex = "request #\\d+"
loglinkregex = "#\\d+"
logregex = "\\d+"

[bugtraq "issues"]
url = "https://github.com/repo/issues/issues/%BUGID%"
logfilterregex = "issues#\\d+"
loglinkregex = "#\\d+"
logregex = "\\d+"

Is my syntax wrong or I misunderstood what multiple configs can achieve? Thank you

mstrap commented 1 month ago

Can you please provide a test repository with this configuration?

Are you using SmartGit, if so, which version?

Grety commented 4 weeks ago

It appears to be working well in my SmartGit 22.1.8: https://github.com/Grety/example-for-bugtraq With each link (#1 and #2 on the screenshot) leading to different URLs:

image

Such a config, however, does require three levels of RegExps, so logfilterregex must be provided. The issue I must have faced was I didn't refresh the repo in SmartGit upon updating the file.

Thanks for looking into this.