Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Slack Notification on PR create

Hi guys,
I have more than one team working in one repo and would like to set up slack notification on the channel of each team if PR is created. For that I have tried to use glob pattern but with no success. Let's say my team on Jira is called ABC so allowed branch names are:
I have tried to use various patterns but when PR from one of mentioned branchech was created no notification was sent.
I have tried:
Is there any way to set a notification trigger for all branches with ABC in the name?

1 answer

0 votes
Caroline R Atlassian Team Nov 25, 2021

Hi, @grandewojtek

Thank you for reaching out to Atlassian Community!

I've reviewed your situation, and I understand that branch patterns have been set up for Slack notifications, however, you're not receiving notifications for pull requests creation with the pattern '*ABC*'

I have tested the steps in one of my own repositories and observed the same behavior, I am not receiving notifications when creating a pull request on the branch with the pattern (*ABC*). However, if I add the pattern "*/ABC*" it works for me.

But before you change this, I would like to give you some context around these notifications. In order to receive a notification when creating a Pull Request, you will need to create a pull request with the branch with the pattern as the target branch.

For example:

Let's say we create a pull request in which the source branch is feature and the target branch is feature/ABC-123. This will trigger a Slack notification.

  • Source branch feature -> target branch feature/ABC-123

    • Notification sent indicating a PR has been created

If I use the opposite pull request, in which we have the source branch as feature/ABC-123 and the target branch as feature, this will not trigger a Slack notification.

  • Source branch feature/ABC-123 -> target branch feature

    • No notification sent indicating a PR has been created

Let me explain why notifications are sent when the branch with patterns is set as the target branch. In a typical workflow, collaborators want to know what changes will affect a target branch. A pull request has changes from a source branch that will be merged with a target branch, so the team wants a notification when changes are coming to the target branch. 

I hope this helps, but do let me know if you have any questions. 

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,262 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you