-
Notifications
You must be signed in to change notification settings - Fork 5
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
add flags to set custom issue and pr regex #8
Conversation
@fd0 Unfortunately it took a bit longer to get back to it, sorry. Not sure what is the best way to test multiple regex variations, so tests for e.g. Gitea regex are currently missing. |
I haven't checked the code but here's a question: Is there any chance that the regex matching will be performed on anything else than the very last set of lines with URLs? Or is it written in such a way that the last part in a changelog file is what's looked through using these regexs, and not all of it? |
I have also thought about it, and I am still not sure. There might be cases where the git server is run as a subfolder (though unlikely). Then the URL would be e.g. |
In that case I think the current regex, Regardless, I think my former question is moot, considering Calens has been working just fine with the current format of regex. |
The current regex starts with a |
In line https://github.com/restic/calens/blob/master/main.go#L365 it looks like the code finds the match it can find, and since there are no anchors in the regex this should match even if there's some stuff before the pattern you target. But to be sure, I suggest you try it with a subfolder URL like you mentioned earlier. I think https://github.com/restic/calens/blob/master/main.go#L322 shows that links are only processed in the very last set of lines (the last paragraph, if you will). |
Addressing #5