siddharthvipul1 / pagure

Forked from pagure 4 years ago
Clone

14dd1d2 Make sure that ticket changes don't get duplicated

Authored and Committed by puiterwijk 5 years ago
    Make sure that ticket changes don't get duplicated
    
    This checks whether a push is done by someone changing things in the
    tickets on the web UI, and does not trigger the ticket hook for that.
    
    This resulted in a ticket constantly opening and closing itself:
    - Ticket is open, person closes. Database is updated
    - Pre-receive hooks trigger, at which point the ticket is still Open in the
      ticket repo
    - Database is updated with the repo contents, opening the ticket repo
    - The closing commit goes through
    - The database update for opening the ticket goes through, reverting the close
    - and so forth
    
    Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>