code-corps / code-corps/code-corps-api

Handle Installation::deleted event

Open
#837 1 comment 0 reactions 0 assignees View on GitHub
needs estimate question
Dominant language
Elixir
Stars
234
Forks
82
PR merge metrics
No merged PRs in 30d

Description

# Problem

A user can delete a github installation from github. In that case, pretty much all of github integration will stop working.

We should handle the `Installation::deleted` event to avoid potential issues.

- receive event
- find and delete associated `GithubAppInstallation` (alternative: set state to "uninstalled")
- find and disassociate associated `Project`
- find and delete associated `GithubRepo` records (alternative: add state field, set state to "uninstalled").
- find and delete associated `ProjectGithubRepo` records

Handling this one is still unclear to me and warrants additional discussion.

https://developer.github.com/v3/activity/events/types/#installationevent

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.