remind101 / slashdeploy

GitHub Deployments for Slack
https://slashdeploy.io
BSD 2-Clause "Simplified" License
153 stars 20 forks source link

Deal with replayed (rebased or rewound) git sha #103

Closed russellballestrini closed 6 years ago

russellballestrini commented 6 years ago

If a push event from github would trigger an auto_deployment, but an AutoDeployment already exists, log a message and return without creating a duplicate AutoDeployment.

The AutoDeployment model is guarded by a foreign key constraint on the sha field so this bug fix simply prevents an exception from firing and provides a more useful log message.

fixes #87

modified:   push_event.rb