# Tag trigger for tags created via bitbuckets website

**URL:** <https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452>\
**Category:** Website Issues\
**Created:** [April 12, 2017, 9:31pm UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452 "2017-04-12T21:31:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alan\_haverty](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/alan_haverty/32/482_2.png) [@alan\_haverty](https://discuss.bitrise.io/u/alan_haverty)\
**Post date:** [April 12, 2017, 9:31pm UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/1 "2017-04-12T21:31:58Z")

</div>

We were having issues getting bitbucket tags to trigger a build. We were adding them to our commits from bitbuckets website, but it didn’t trigger a build until we tried the command line git to push a tag. Is that expected? (Email support asked me to raise here)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 13, 2017, 6:41am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/2 "2017-04-13T06:41:21Z")

</div>

Thanks for reporting @alan_haverty - I already created an internal ticket for this, we’ll try to investigate it ASAP!

In the meantime if you have the time, could you please describe where you created the tag on the Bitbucket UI? Also, did you try to create the same tag on Bitbucket UI and then in git, or did you create different ones? (in which case it _might_ be related to your tag trigger pattern)

---

<div class="post-metadata">

**Author:** ![tamaspapik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tamaspapik/32/251_2.png) [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Post date:** [April 13, 2017, 8:11am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/3 "2017-04-13T08:11:41Z")

</div>

Hey @alan_haverty! 👋🏻

Just started to test this, and I’ve encountered the following:

1. I created a fresh repo
2. Created and committed a [README.md](http://README.md)
3. I’ve added `testtag` tag to this commit / There I’ve seen no build triggered at all  
(anyway… I continued the discovery)
4. I’ve created and committed a file `test` with the content `test` -\> then I’ve noticed that bitbucket created a branch with the name `testtag` and my `test` file committed there
5. Then I wanted to merge `testtag` (with the file `test`) branch to `master` (with the file [README.md](http://README.md))
6. Merge failed well enough because now I have a master branch tagged with `testtag` WITHOUT the test file and it’s commit and I’ve lost `testtag` branch as well. So I lost a file within a small couple of seconds test.

It seems like bitbucket does something very differently when you want to create a tag online.  
I keep trying to find your issue, but for now Bitbucket seems to be the issue itself. 😅

---

<div class="post-metadata">

**Author:** ![alan\_haverty](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/alan_haverty/32/482_2.png) [@alan\_haverty](https://discuss.bitrise.io/u/alan_haverty)\
**Post date:** [April 13, 2017, 9:02am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/4 "2017-04-13T09:02:40Z")

</div>

Thanks @tamaspapik @viktorbenei,  
I’m new to tags to be honest, and if I can get away with using UI over CLI these days I do.  
However, the Git tag command works well, and is probably the smarter solution anyway.  
Thanks for testing! 🕶

---

<div class="post-metadata">

**Author:** ![tamaspapik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tamaspapik/32/251_2.png) [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Post date:** [April 13, 2017, 9:19am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/5 "2017-04-13T09:19:42Z")

</div>

Issue discovered!

When a tag added online, Bitbucket’s request doesn’t send changes[]

```auto
{
  "push": {
    "changes": [] <---
  },
  "repository": {
...

```

From git command:

```auto
{
  "push": {
    "changes": [
      {
        "forced": false,
        "old": null,
        "links": {
          "commits": {
...

```

Thank you for the report @alan_haverty  
🚀🎉

---

<div class="post-metadata">

**Author:** ![tamaspapik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tamaspapik/32/251_2.png) [@tamaspapik](https://discuss.bitrise.io/u/tamaspapik)\
**Post date:** [April 13, 2017, 9:40am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/6 "2017-04-13T09:40:18Z")

</div>

Checked around, we don’t have anything to fix in this case. Simply Bitbucket sends 0 trigger information to Bitrise.

To get notified when the issue is resolved, please follow the following Bitbucket issue:  
[https://bitbucket.org/site/master/issues/13865/creating-tags-from-the-ui-sends-two-empty](https://bitbucket.org/site/master/issues/13865/creating-tags-from-the-ui-sends-two-empty)

Hope they will fix it asap! 😊

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 13, 2017, 9:53am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/7 "2017-04-13T09:53:16Z")

</div>

> [@tamaspapik](#):
>
> Simply Bitbucket sends 0 trigger information to Bitrise.

Just to be precise, not just to Bitrise: **the Bitbucket webhook** sent to any service **does not include any “change” info when the tag is created on the [Bitbucket.org](http://Bitbucket.org) UI**.

Which means that we have to ignore that webhook request, because there actually is no info in the webhook what changed / what happened. It’s just an empty “changes” array.

---

<div class="post-metadata">

**Author:** ![alan\_haverty](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/alan_haverty/32/482_2.png) [@alan\_haverty](https://discuss.bitrise.io/u/alan_haverty)\
**Post date:** [January 15, 2018, 12:17pm UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/8 "2018-01-15T12:17:58Z")

</div>

It looks like tags aren’t triggering bitrise via CLI created tags anymore now either. I’m assuming it’s bitbucket being bitbucket, but just an FYI in case it’s not.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 15, 2018, 1:22pm UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/9 "2018-01-15T13:22:53Z")

</div>

@alan_haverty can you please check the webhook history on bitbucket to see if bitbucket sent any webhook for the event (I’d suggest you to open the webhook history there, then create a new tag and see if there’s a new item in the history)? The response from [bitrise.io](http://bitrise.io) should be there too, stating the reason why it did not start a build in case it would not start a build. Further webhook related troubleshooting (guide): [http://devcenter.bitrise.io/webhooks/troubleshooting/](http://devcenter.bitrise.io/webhooks/troubleshooting/)

---

<div class="post-metadata">

**Author:** ![alan\_haverty](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/alan_haverty/32/482_2.png) [@alan\_haverty](https://discuss.bitrise.io/u/alan_haverty)\
**Post date:** [January 29, 2018, 9:59am UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/10 "2018-01-29T09:59:29Z")

</div>

Hi @viktorbenei Just want to confirm it was the webhook that was off. Tagging items via Bitbucket website is also triggering Bitrise builds, so the original issue is resolved. Thanks for the help 👏

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 29, 2018, 7:53pm UTC](https://discuss.bitrise.io/t/tag-trigger-for-tags-created-via-bitbuckets-website/1452/11 "2018-01-29T19:53:37Z")

</div>

Awesome, thanks for reporting @alan_haverty! 🙂
