Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation firing twice for single Github webhook

jamie August 4, 2022

I have automation to check if the Github pull request is opened as a Draft and not transition the ticket but instead add a comment.  I see a single webhook on the Github side but the automation rule runs twice which is adding multiple comments (even with the prevent duplicate checkbox to only add a single comment).

Github webhook:

Screen Shot 2022-08-04 at 10.21.20 AM.png

Rule log

Screen Shot 2022-08-04 at 10.31.23 AM.png

Screen Shot 2022-08-04 at 10.31.36 AM.png

Automation rule:

Screen Shot 2022-08-04 at 10.42.30 AM.png

Screen Shot 2022-08-04 at 10.43.07 AM.pngScreen Shot 2022-08-04 at 10.43.36 AM.png

Ticket

Screen Shot 2022-08-04 at 10.44.14 AM.png

Any ideas on how to prevent this? Thanks!

2 answers

1 accepted

1 vote
Answer accepted
jamie August 18, 2022

The solution was to check to make sure you don't have multiple webhooks coming from Github for the same type of hook.  When you add a webhook to a specific repository and then one at the organizational level, they both fire causing duplication in Jira.

0 votes
Stefan Salzl
Community Champion
August 4, 2022

Hi @jamie ,

couldn‘t find your „pull_request.actions“ in the payload.

Could you also write those values that you are comparing to the the action log?

Furthermore:

Are the compared against string or boolean true?

Best
Stefan

jamie August 4, 2022

action log:

action: opened. Draft: true

Here is what I am comparing
Screen Shot 2022-08-04 at 12.28.27 PM.png

I think that once it fires, it's working as intended.  I guess my question is why are there 2 entries in the Audit Log for the same ticket at the same time when only one Github webhook fired?  

Stefan Salzl
Community Champion
August 4, 2022

ah...I didn‘t notice it‘s writing exactly the same message twice. please appologize 🙏🏼

hmm....that looks really weird indeed. could you please share a screenshot of the audit log? what does the jql look like and what is the result?

Best
Stefan

jamie August 4, 2022

I think I figured it out.  I added a webhook to the Github test repository while testing and then when I finished, I added the webhook to the org but forgot to remove the test one. So I think the webhook was actually firing twice from Github but I was only looking at one queue.  Removed the test one and things look promising.  If not, I will grab the screenshots and any else I come across.  Thanks for your help!

Like # people like this
Stefan Salzl
Community Champion
August 6, 2022

Hej @jamie ,

In case the situation you described was the problem could you post your solution as a separate answer and accept your answer so this iasue can be marked as solved and make it easier for other users to find the solution?

Best
Stefan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events