Browse Source

Add TODO for order of operations

kegan/github-webhook-creation
Kegan Dougal 8 years ago
parent
commit
4b41bfb484
  1. 6
      src/github.com/matrix-org/go-neb/services/github/github.go

6
src/github.com/matrix-org/go-neb/services/github/github.go

@ -201,6 +201,12 @@ func (s *githubService) PostRegister(oldService types.Service) {
return
}
// TODO: We should be adding webhooks in Register() then removing old hooks in PostRegister()
//
// By doing both operations in PostRegister(), if some of the requests fail we can end up in
// an inconsistent state. It is a lot simpler and easy to reason about this way though, so
// for now it will do.
// remove any existing webhooks this service created on the user's behalf
modifyWebhooks(old, cli, true)

Loading…
Cancel
Save