Closed tommy-muehle closed 11 months ago
Yes, I have to make sure there is an index one.
I will patch this and will give a helpful warning.
The regex should contain a group like this "([A-Z]+-[0-9]+)"
then it should work.
I will go and fix the panic ;)
@sebastianfeldmann Can confirm, a group also fixes the issue!
Just released 1.0.2
it checks the match slice before using match[1]
If it is too short you get a message that you should put your ISSUE-KEY in a regex group.
Thanks for the help :)
Hi @sebastianfeldmann 👋
not seen or heard for a long time! But I hope you're doing well. 🙂 I'm currently playing around with Captain Hook for Go. Therefore I added the following configuration to my repository:
My branch name is just
PRODUCT-2453
and it's catched successfully!But I get a panic
panic: runtime error: index out of range [1] with length 1
.If I looked correct and it's not too late it's because you're looking into
match[1]
instead ofmatch[0]
here.Proof of concept:
Best regards, Tommy