I want to be able to monitor in Pull Requests if a particular word or phrase is mentioned in the comment section.
So the flow would go like;
1. create PR
2. mention phrase in comment for example "trigger xyz"
3. Request made to external service with body of xyz
Thanks!
Hi @Kevin Gilmore,
Welcome to Atlassian Community!
You could do this by using a webhook that triggers when a comment is created in a PR. Have a look at Manage webhooks for more information.
Oh, wow, I didn't know about this. It looks easier than the approach I suggested.
But, can you check for the keyword "trigger" and parse out "xyz" with this approach? (Maybe Kevin can handle this on the external service's side, if it cannot be done on the Bitbucket side...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The webhook will only trigger based on the event, you would still have to configure your external script to parse the comment for what you are looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think you can do this in the Bitbucket side, but if your pull requests are normally related to Jira issues, then you can definitely create an automation rule on the Jira side!
For exampe, you can create a rule with the trigger Issue commented, then check the comment text for the keyword "trigger" using the Advance Compare Condition, finally send the request to the external system using the Webhook action. It'd definitely work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.