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 #104

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+ environment fields so this bug fix simply prevents an exception from firing and provides a more useful log message.

fixes #87

modified:   CONTRIBUTING.md
modified:   app/github/push_event.rb
modified:   config/database.yml
modified:   lib/slashdeploy/service.rb
russellballestrini commented 6 years ago

@ejholmes please take another pass.

russellballestrini commented 6 years ago

@ejholmes ok, I think I got it now. please review.