How to trigger hooks only for tags in master?
Issue #12
resolved
I've set up branch filter as master
and tag filter as ^\d+\.\d+\.\d+$
, also I use ${refChange.name}
in URL. When I push the new tag, let's say 0.3.2
to master branch the hook fires two times, first with ${refChange.name}
resolved to master
, second to 0.3.2
.
Maybe I set the tag filter wrong? Does the plugin pass the full refid to the tag filter, e.g. refs/tags/0.3.2
at my case?
The documentation really lacks information about what will be matched and how the combination of filters will work. I tired to dig this from source, but it's still a bit shady for me.
Comments (2)
-
-
- changed status to resolved
- Log in to comment
Hi @igor_urazov,
you can find the code here: src/main/java/de/aeffle/stash/plugin/hook/helper/ContextFilter.java
Here you can see the String refName which will be "0.3.2" when pushing the tag "0.3.2". When pushing the branch "master" the refName will be "master". I guess that you are pushing tags as well as branches. If you leave the branch filter empty, the url will be called. If you do not want that, simply add a filter which will not match, e.g. "$a" (all strings which have an a after they ended - which is never true).
Hope I could clear that issue for you.
Let me know if you still have problems.
Cheers, Alex