Our workflow process involves first merging changes into the staging environment and only after that - to prod. We'd like to automate the respective ticket transitions between the states. For example:
However, we found that the bitbucket triggers lack granularity: when the same code is merged into the master branch, the same trigger fires again causing the same transition.
What's the best way to achieve our desired behavior?