Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I setup a Automation rule only for PRs matching certain criteria?

I am trying to  create an Automation rules to transition linked Jira issue(s) to `Done` when a PR is merged.

Right now since there is no additional configuration for  "PR merged" trigger, my rule is running for every PR, but for my usecase I want this rule to trigger only or PRs matching certain criteria, e.g. when PR title has some keyword. How can I accomplish this? 

1 answer

0 votes
Stuart C Community Leader Aug 17, 2020

Hi @Bharat Patel 

You can add a 'condition' 

Capture.PNG'Issue fields condition' will let you search for keywords in the summary.

Hope this helps, let me know if I've misinterpreted your question.

hi @Stuart C actually I want to define a condition based on PR title, e.g. PR title contains "#mergeit", not on JIRA issue fields. 

Stuart C Community Leader Aug 18, 2020

Ah! Sorry Bharat,

I see what you're after now.

I haven't had chance to test this myself but I wanted put it out there whilst I look into it. 

I believe you can create a webhook in Bitbucket (https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/) and use 'merged' from the pull request triggers.

Then use that incoming webhook as a trigger in the automation rule and for the condition you can use 'advanced compare condition' to specify {{webhookData.title}} > equals > #mergeit

I'll try and test this tonight but let me know if you confirm or deny this works before I do :)

hi @Stuart C 

Thanks for your reply and that suggestion, that would have worked perfectly only if Bitbucket webhook included JIRA issues in the webhook data :) 

I can get the automation to trigger conditionally via webhook approach, but problem now is it can't find the JIRA issues to act on. 

Screen Shot 2020-08-18 at 8.52.14 AM.png

Thanks

-Bharat

Stuart C Community Leader Aug 18, 2020

Oh man, we're so close! 😂

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

48 views 0 3
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